Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e47f8fd
Add hipification changes
pnunna93 Oct 12, 2023
fc7f9fa
Enable hipification for nvrtc soft linking
pnunna93 Oct 12, 2023
28646f1
use CUPY_CUDA_VERSION for pxi loading
pnunna93 Oct 17, 2023
a95bba3
Remove prefix in softlink class
pnunna93 Oct 17, 2023
d66e262
Update pretest.yml
okakarpa Oct 17, 2023
c1cfcb3
rename library to fix issue with nvrtc linking
pnunna93 Oct 19, 2023
4d3c2cc
Merge branch 'cupy_13_hipify' of https://github.com/ROCmSoftwarePlatf…
pnunna93 Oct 19, 2023
a1d618c
Merge branch 'rocm6.1_internal_testing' into cupy_13_hipify
Oct 24, 2023
0171e9c
Fix merge errors and update with latest upstream changes
Oct 24, 2023
8952ad2
cudnn , miopen changes on 6.1 branch
Oct 27, 2023
6a3132a
changes for cusolver hip integration https://github.com/ROCmSoftwareP…
Nov 6, 2023
587dd2d
changes from https://github.com/ROCmSoftwarePlatform/cupy/blob/rocm6.…
Nov 6, 2023
bfb87a1
changes from https://github.com/ROCmSoftwarePlatform/cupy/blob/rocm6.…
Nov 6, 2023
a478f58
changes from https://github.com/ROCmSoftwarePlatform/cupy/blob/rocm6.…
Nov 6, 2023
5368a29
changes from f2475950c4aa6df4cbf9ffb1649d93d85ecb3255 11050f0
Nov 6, 2023
7465285
changes from 11050f0
Nov 6, 2023
67dd981
changes for installing cupy after rocm6.0 changes for cusolver
Nov 6, 2023
9018391
Add prefix back and hipify torch dict for hip function mappings
pnunna93 Nov 8, 2023
d428b6c
update test_solve.py from 41d4d9e
bmedishe Nov 8, 2023
3053cd3
Fix cuda build failures
Nov 10, 2023
aa4737a
Use preprosessor macros to conditionally include pxi files
Nov 11, 2023
4b161e0
Revert "Use preprosessor macros to conditionally include pxi files"
Nov 13, 2023
1b8a68d
Test CI for stub/CUDA
lcskrishna Nov 14, 2023
3b2264b
update from code review comments
bmedishe Nov 14, 2023
24540bf
pre-commit flaske issue
bmedishe Nov 14, 2023
03722a3
Fix build issues with CUDA/stub builds & enable hipify torch in CI/CD
Nov 14, 2023
3941cef
fixed flake8 issues
Nov 15, 2023
d8a7ad4
Merge pull request #35 from ROCmSoftwarePlatform/cupy_13_hipify_fix_c…
pnunna93 Nov 15, 2023
4db64ba
Cleaned up conditionals
Nov 15, 2023
9a0b259
Revert github actions runner
Nov 15, 2023
5f21576
Add hipify-torch to ci
Nov 15, 2023
787f0c7
Add git to rocm ci
AdrianAbeyta Nov 15, 2023
f3d235d
Update pretest-rocm-test.sh
AdrianAbeyta Nov 15, 2023
5a50e31
Fix flake8 issues
Nov 16, 2023
451f2d5
Merge branch 'cupy_13_hipify' of https://github.com/ROCmSoftwarePlatf…
Nov 16, 2023
998e03a
Merge pull request #32 from ROCmSoftwarePlatform/cupy_13_hipify
AdrianAbeyta Nov 16, 2023
bbeb631
Fix conflicts with testing branch
Nov 16, 2023
febdf4a
Fix flake8 issues
Nov 16, 2023
b340967
Update pretest-rocm-test.sh
AdrianAbeyta Nov 16, 2023
ad9b145
some tests are skipped for rocm
bmedishe Nov 20, 2023
50048ba
unit tests failing with AttributeError: module 'cupyx' has no attribu…
bmedishe Nov 22, 2023
b4b95e9
hipify third_party/cccl
bmedishe Nov 22, 2023
8aa5af0
Revert "hipify third_party/cccl"
bmedishe Nov 22, 2023
04480aa
Revert "unit tests failing with AttributeError: module 'cupyx' has no…
bmedishe Nov 22, 2023
c64d3c1
Merge pull request #34 from ROCmSoftwarePlatform/hip_solver_lazy_loading
AdrianAbeyta Nov 22, 2023
cef800e
update miopen.pyx
bmedishe Nov 27, 2023
842331a
do not skip tests
bmedishe Nov 27, 2023
685bc5a
cudnn , miopen changes on 6.1 branch
Oct 27, 2023
0c0f0be
update miopen.pyx
bmedishe Nov 27, 2023
fd2b322
do not skip tests
bmedishe Nov 27, 2023
c4ec1bb
Merge branch 'rocm5.1_it_miopen_integration' of https://github.com/RO…
bmedishe Nov 27, 2023
334557c
update _feature.py with miopen lib, include
bmedishe Nov 28, 2023
d396e57
add cudnn in _features.py
bmedishe Nov 28, 2023
02ab1ff
_is_hip_env replaced with hip_env
bmedishe Nov 28, 2023
9d2148f
tabs error
bmedishe Nov 29, 2023
8e0c0a1
runtime.hip_env replaced with runtime._is_hip_env
bmedishe Nov 29, 2023
d81e48c
update cudnn.pyx debug errors
bmedishe Nov 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pretest-rocm-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
set -uex

apt-get -y update
DEBIAN_FRONTEND=noninteractive apt-get -y install python3.9-dev python3-pip
DEBIAN_FRONTEND=noninteractive apt-get -y install python3.9-dev python3-pip git

hipconfig

python3.9 -m pip install -U pip wheel
pip install git+https://github.com/ROCmSoftwarePlatform/hipify_torch.git

export ROCM_HOME="/opt/rocm"
export HCC_AMDGPU_TARGET="gfx900"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pretest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
run: |
pip install pre-commit

- name: Install hipify-torch
run: |
pip install git+https://github.com/ROCmSoftwarePlatform/hipify_torch.git

- name: Check
run: |
pre-commit run -a --show-diff-on-failure
Expand Down Expand Up @@ -77,6 +81,7 @@ jobs:

- name: Build
run: |
pip install git+https://github.com/ROCmSoftwarePlatform/hipify_torch.git
pip install -U pip wheel
READTHEDOCS=True pip install -v -e .
ccache --max-size 0.5Gi --cleanup --show-stats
Expand Down
17 changes: 16 additions & 1 deletion cupy_backends/cuda/_softlink.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ from libc.stdint cimport intptr_t
cimport cython


def get_hipfuncname(cudafuncname):
import hipify_torch
from hipify_torch import cuda_to_hip_mappings
cuda_to_hip_map_list = cuda_to_hip_mappings.CUDA_TO_HIP_MAPPINGS
for cuda_to_hip_map in cuda_to_hip_map_list:
if cudafuncname in cuda_to_hip_map:
return cuda_to_hip_map[cudafuncname][0]
return cudafuncname


cdef class SoftLink:
def __init__(self, object libname, str prefix, *, bint mandatory=False):
self.error = None
Expand All @@ -31,7 +41,12 @@ cdef class SoftLink:
"""
if self._cdll is None:
return <func_ptr>_fail_unsupported
cdef str funcname = f'{self.prefix}{name}'
cudafuncname = f'{self.prefix}{name}'
IF CUPY_HIP_VERSION != 0:
hipfuncname = get_hipfuncname(cudafuncname)
cdef str funcname = f'{hipfuncname}'
ELSE:
cdef str funcname = f'{cudafuncname}'
cdef object func = getattr(self._cdll, funcname, None)
if func is None:
return <func_ptr>_fail_not_found
Expand Down
8 changes: 1 addition & 7 deletions cupy_backends/cuda/libs/_cnvrtc.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ cdef SoftLink _get_softlink():
libname = 'nvrtc64_120_0.dll'
elif CUPY_HIP_VERSION != 0:
runtime_version = runtime.runtimeGetVersion()
prefix = 'hiprtc'
if runtime_version < 5_00_00000:
# ROCm 4.x
libname = 'libamdhip64.so.4'
elif runtime_version < 6_00_00000:
# ROCm 5.x
libname = 'libamdhip64.so.5'
libname = 'libamdhip64.so'

return SoftLink(libname, prefix, mandatory=True)
Loading