File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 5151
5252num_ref_states = 5
5353
54+ def check_system ():
55+ print ("asdasdasd" )
56+ if os .environ .get ("TORCH_ALLOW_TF32_CUBLAS_OVERRIDE" ) is not None :
57+ print (
58+ "\n "
59+ f" !! { col_red } IMPORTANT: The environment variable TORCH_ALLOW_TF32_CUBLAS_OVERRIDE is set!{ col_default } \n "
60+ f" !! { col_red } This causes Torch to run in reduced precision mode, which is likely to cause this "
61+ f"script to fail or result in broken models.{ col_default } \n "
62+ "\n "
63+ )
64+
65+
5466def save_dict (filename , dict_ , args ):
5567 path = os .path .join (args ["work_dir" ], filename )
5668 with open (path , "w" , encoding = "utf8" ) as f :
@@ -104,6 +116,8 @@ def prepare_env(args):
104116
105117
106118def prepare (args ) -> (dict , dict , bool , str ):
119+ check_system ()
120+
107121 if not args .work_dir :
108122 return None , None , False , "Must specify --work_dir"
109123 if not args .in_dir and not args .resume :
You can’t perform that action at this time.
0 commit comments