[ROCm] Pyt 2.0 rocm staging (#94660)

Add triton support for ROCm builds of PyTorch.

* Enables inductor and dynamo when rocm is detected
* Adds support for pytorch-triton-mlir backend
* Adds check_rocm support for verify_dynamo.py

Pull Request resolved: https://github.com/pytorch/pytorch/pull/94660
Approved by: https://github.com/malfet
This commit is contained in:
Douglas Lehr
2023-02-15 06:15:18 +00:00
committed by PyTorch MergeBot
parent 71ec2617d2
commit 77d1135566
3 changed files with 68 additions and 1 deletions

View File

@ -939,6 +939,13 @@ def configure_extension_build():
# These extensions are built by cmake and copied manually in build_extensions()
# inside the build_ext implementation
if cmake_cache_vars['USE_ROCM']:
triton_req_file = os.path.join(cwd, ".github", "requirements", "triton-requirements-rocm.txt")
if os.path.exists(triton_req_file):
with open(triton_req_file) as f:
triton_req = f.read().strip()
extra_install_requires.append(triton_req)
if cmake_cache_vars['BUILD_CAFFE2']:
extensions.append(
Extension(