@@ -142,7 +142,7 @@ def check_rocm():
142
142
return rocm_ver if torch .version .hip else "None"
143
143
144
144
145
- def check_dynamo (backend : str , device : str , err_msg : str ) -> None :
145
+ def check_dynamo (backend , device , err_msg ) -> None :
146
146
import torch
147
147
148
148
if device == "cuda" and not torch .cuda .is_available ():
@@ -151,15 +151,17 @@ def check_dynamo(backend: str, device: str, err_msg: str) -> None:
151
151
152
152
try :
153
153
import torch ._dynamo as dynamo
154
- from torch ._dynamo .eval_frame import raise_if_inductor_unavailable
155
154
156
- try :
157
- raise_if_inductor_unavailable (device )
158
- except RuntimeError as e :
159
- print (
160
- f"WARNING: Inductor not available for { device } ({ e } ). Skipping check."
161
- )
162
- return
155
+ if device == "cuda" :
156
+ from torch .utils ._triton import has_triton
157
+
158
+ if not has_triton ():
159
+ print (
160
+ f"WARNING: CUDA available but triton cannot be used. "
161
+ f"Your GPU may not be supported. "
162
+ f"Skipping CUDA check on { backend } backend\n "
163
+ )
164
+ return
163
165
164
166
dynamo .reset ()
165
167
@@ -203,8 +205,6 @@ def forward(self, x):
203
205
204
206
205
207
def main () -> None :
206
- from torch ._dynamo .eval_frame import is_dynamo_supported
207
-
208
208
python_ver = check_python ()
209
209
torch_ver = check_torch ()
210
210
cuda_ver = check_cuda ()
@@ -215,10 +215,10 @@ def main() -> None:
215
215
f"CUDA version: { cuda_ver } \n "
216
216
f"ROCM version: { rocm_ver } \n "
217
217
)
218
- if not is_dynamo_supported ():
219
- warnings .warn ("Dynamo is not supported on this platform. Skipping check." )
220
- return
221
218
for args in _SANITY_CHECK_ARGS :
219
+ if sys .version_info >= (3 , 13 ):
220
+ warnings .warn ("Dynamo not yet supported in Python 3.13. Skipping check." )
221
+ continue
222
222
check_dynamo (* args )
223
223
print ("All required checks passed" )
224
224
0 commit comments