Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows][Pytorch Upstream] Triton do_bench returns time not greater than 0 on Windows. #3072

Open
etaf opened this issue Dec 27, 2024 · 0 comments
Labels
bug Something isn't working windows

Comments

@etaf
Copy link

etaf commented Dec 27, 2024

Describe the bug

The timing from triton's do_bench is not greater than 0 on windows.
The error:

(xinanlin) C:\xinanlin\pytorch>python test\inductor\test_benchmarking.py -vf
test_benchmark_cpu_smoke_benchmarker_cls0 (__main__.TestBenchmarker) ... inductor [('benchmarking.Benchmarker.benchmark_cpu', 1)]
ok
test_benchmark_cpu_smoke_benchmarker_cls1 (__main__.TestBenchmarker) ... inductor [('benchmarking.TritonBenchmarker.benchmark_cpu', 1)]
ok
test_benchmark_gpu_smoke_benchmarker_cls0 (__main__.TestBenchmarker) ... inductor [('benchmarking.Benchmarker.benchmark_gpu', 1)]
expected failure
test_benchmark_gpu_smoke_benchmarker_cls1 (__main__.TestBenchmarker) ... inductor [('benchmarking.TritonBenchmarker.benchmark_gpu', 1), ('benchmarking.TritonBenchmarker.triton_do_bench', 1)]
FAIL

======================================================================
FAIL: test_benchmark_gpu_smoke_benchmarker_cls1 (__main__.TestBenchmarker)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\xinanlin\pytorch\torch\testing\_internal\common_utils.py", line 3108, in wrapper
    method(*args, **kwargs)
  File "c:\xinanlin\pytorch\torch\testing\_internal\common_utils.py", line 557, in instantiated_test
    test(self, **param_kwargs)
  File "c:\xinanlin\pytorch\torch\testing\_internal\common_utils.py", line 840, in test_wrapper
    return test(*args, **kwargs)
  File "C:\xinanlin\pytorch\test\inductor\test_benchmarking.py", line 82, in test_benchmark_gpu_smoke
    self.assertGreater(timing, 0)
AssertionError: -1.3166919946670532 not greater than 0

To execute this test, run the following from the base repo dir:
    python test\inductor\test_benchmarking.py TestBenchmarker.test_benchmark_gpu_smoke_benchmarker_cls1

This message can be suppressed by setting PYTORCH_PRINT_REPRO_ON_FAILURE=0

----------------------------------------------------------------------
Ran 4 tests in 0.592s

FAILED (failures=1, expected failures=1)

The benchmark use Triton's do_bench as follow:
https://github.com/pytorch/pytorch/blob/6bdf2addc5e83cdf67af1261c417b3c91104ad02/torch/_inductor/runtime/benchmarking.py#L181-L202

Environment details

Triton main 6abfacb
PyTorch main 12662901aa8ced7d1118193e40dd4f018bb2e0fa

@etaf etaf added the bug Something isn't working label Dec 27, 2024
@etaf etaf changed the title [Windows][Pytorch Upstream] Triton do_bench returns time not greater than 0. [Windows][Pytorch Upstream] Triton do_bench returns time not greater than 0 on Windows. Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

3 participants