Apply force_full_precision if was set on device_select.

This commit is contained in:
Marc-Andre Ferland 2022-10-28 02:00:59 -04:00
parent ae553dfed3
commit 0185ef7c83

View File

@ -77,6 +77,8 @@ def device_select(device):
thread_data.device = device
thread_data.has_valid_gpu = True
# Apply force_full_precision if was set.
thread_data.precision = 'full' if thread_data.force_full_precision else 'autocast'
return True
def device_init(device_selection=None):