mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[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:
committed by
PyTorch MergeBot
parent
71ec2617d2
commit
77d1135566
7
setup.py
7
setup.py
@ -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(
|
||||
|
Reference in New Issue
Block a user