Use bf16 only if supported

This commit is contained in:
Alexander Pivovarov committed 2023-05-17 03:26:48 +00:00
1 parent 7fe4a099ad
commit eb33b8bf1c
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ bias = False
real_data = True
seed = 1337
device = 'cuda' # examples: 'cpu', 'cuda', 'cuda:0', 'cuda:1', etc.
dtype = 'bfloat16' # 'float32' or 'bfloat16' or 'float16'
dtype = 'bfloat16' if torch.cuda.is_bf16_supported() else 'float16' # 'float32' or 'bfloat16' or 'float16'
compile = True # use PyTorch 2.0 to compile the model to be faster
profile = False # use pytorch profiler, or just simple benchmarking?
exec(open('configurator.py').read()) # overrides from command line or config file