Skip to content

Commit

Permalink
AIO on ROCM (#7023)
Browse files Browse the repository at this point in the history
Adding compile support for AIO library on AMD GPUs.

---------

Co-authored-by: Olatunji Ruwase <[email protected]>
Co-authored-by: Logan Adams <[email protected]>
  • Loading branch information
3 people authored Feb 14, 2025
1 parent e637677 commit 14b3cce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions op_builder/async_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ def extra_ldflags(self):

import torch.utils.cpp_extension
CUDA_HOME = torch.utils.cpp_extension.CUDA_HOME
CUDA_LIB64 = os.path.join(CUDA_HOME, "lib64")
ldflags = [f'-L{CUDA_HOME}', f'-L{CUDA_LIB64}', '-laio', '-lcuda', '-lcudart']
if CUDA_HOME is None:
ldflags = ['-laio'] # the ROCM case
else:
CUDA_LIB64 = os.path.join(CUDA_HOME, "lib64")
ldflags = [f'-L{CUDA_HOME}', f'-L{CUDA_LIB64}', '-laio', '-lcuda', '-lcudart']
return ldflags

def check_for_libaio_pkg(self):
Expand Down

0 comments on commit 14b3cce

Please sign in to comment.