Merge pull request #279 from sfinktah/sfink-cudnn-benchmark

Added env_var for cudnn.benchmark
This commit is contained in:
patientx 2025-08-28 23:17:05 +03:00 committed by GitHub
commit c8af694267
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -438,6 +438,13 @@ try:
else:
print(" :: Disabled cuDNN")
if os.environ.get("TORCH_BACKENDS_CUDNN_BENCHMARK"):
torch.backends.cudnn.benchmark = os.environ.get("TORCH_BACKENDS_CUDNN_BENCHMARK", "1").strip().lower() not in {"0", "off", "false", "disable", "disabled", "no"}
if torch.backends.cudnn.benchmark:
print(" :: Enabled cuDNN Benchmark")
else:
print(" :: Disabled cuDNN Benchmark")
@triton.jit
def _zluda_kernel_test(x_ptr, y_ptr, n_elements, BLOCK_SIZE: tl.constexpr):
pid = tl.program_id(axis=0)