Skip to content

Commit d4a5c2a

Browse files
generatedunixname499836121facebook-github-bot
generatedunixname499836121
authored andcommitted
Revert "has_triton: Use the device interface for detecting Triton availability (#139171)"
Summary: This reverts commit 48bfe9afc70a98addd5aa738bf501c029e4a9285. Reverted pytorch/pytorch#139171 on behalf of https://github.com/masnesral due to Performance regression for huggingface ([comment](pytorch/pytorch#139171 (comment))) Reviewed By: huydhn Differential Revision: D74531472 fbshipit-source-id: 751398ae3c03cdd1d1d7c75a5088207a3a1784cb
1 parent 232e23f commit d4a5c2a

File tree

1 file changed

+6
-5
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+6
-5
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ def record_compilation_metrics(
15461546
"dynamo_config": _get_dynamo_config_for_logging(),
15471547
"inductor_config": _scrubbed_inductor_config_for_logging(),
15481548
"cuda_version": torch.version.cuda,
1549-
"triton_version": triton.__version__ if has_triton_package() else "",
1549+
"triton_version": triton.__version__ if has_triton() else "",
15501550
"remote_cache_version": remote_cache_version,
15511551
"inductor_fx_remote_cache_backend_type": inductor_fx_remote_cache_backend_type,
15521552
"python_version": sys.version,
@@ -3803,14 +3803,15 @@ def build_checkpoint_variable(**options):
38033803
)
38043804

38053805

3806-
def is_compile_supported(device_type: str) -> bool:
3806+
def is_compile_supported(device_type):
38073807
from .eval_frame import is_dynamo_supported
38083808

3809+
type = torch.device(device_type).type
38093810
compile_supported = is_dynamo_supported()
3810-
if device_type == "cpu":
3811+
if type == "cpu":
38113812
pass
3812-
elif device_type in ["cuda", "xpu"] and compile_supported:
3813-
compile_supported = has_triton(device_type)
3813+
elif type in ["cuda", "xpu"] and compile_supported:
3814+
compile_supported = has_triton()
38143815
else:
38153816
compile_supported = False
38163817
return compile_supported

0 commit comments

Comments
 (0)