-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[ROCm] add support for ROCm/HIP device #6086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jeffdaily
wants to merge
36
commits into
microsoft:master
Choose a base branch
from
jeffdaily:rocm2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
01ff268
[ROCm] add support for ROCm/HIP
jeffdaily ac966a5
more rocm updates
jeffdaily 6ae6432
more bug fixes
jeffdaily 5b87bcd
warp 32 vs 64 updates
jeffdaily 3ad89f8
lint fixes
jeffdaily 7b8b6a0
missing device_index variable
jeffdaily 62aa30b
accidental inclusion of hip headers
jeffdaily bb27c55
copyright notice compliance
jeffdaily 58ace9c
Merge branch 'master' into rocm2
shiyu1994 0bc1cfb
Merge branch 'master' into rocm2
shiyu1994 a7c9653
Merge branch 'master' into rocm2
shiyu1994 96e3a52
Merge branch 'master' into rocm2
shiyu1994 cb7623a
Merge branch 'master' into rocm2
shiyu1994 9ba27bb
Merge branch 'master' into rocm2
shiyu1994 5ba59b8
Merge branch 'master' into rocm2
shiyu1994 c0abd17
fix conflicts
shiyu1994 e7129a0
Update CMakeLists.txt
shiyu1994 eb0036f
Merge branch 'master' into rocm2
shiyu1994 dbd972e
fix lint issue
shiyu1994 4cd0dea
Merge branch 'master' into rocm2
shiyu1994 3ad2482
Merge branch 'master' into rocm2
shiyu1994 8f6600e
clean up
shiyu1994 47fc353
Merge branch 'rocm2' of https://github.com/jeffdaily/LightGBM into HEAD
shiyu1994 2e8869c
Merge branch 'master' into rocm2
shiyu1994 b173124
Update CMakeLists.txt
shiyu1994 785b341
Update CMakeLists.txt
shiyu1994 f4c605d
merge master
shiyu1994 3cd34a2
clean up CMakeLists.txt
shiyu1994 89605b8
Merge branch 'master' into rocm2
shiyu1994 c66b8f3
Merge branch 'master' into rocm2
shiyu1994 8591248
Merge branch 'master' into rocm2
StrikerRUS 8b1c95a
Merge branch 'master' into rocm2
shiyu1994 6732b79
use WARPSIZE
28d4648
Merge branch 'rocm2' of https://github.com/jeffdaily/LightGBM into HEAD
9a19de6
Merge branch 'master' into rocm2
shiyu1994 d4676d9
fix share buffer size
shiyu1994 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -463,3 +463,6 @@ dask-worker-space/ | |
*.pub | ||
*.rdp | ||
*_rsa | ||
|
||
# hipify-perl -inplace leaves behind *.prehip files | ||
*.prehip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
for DIR in ./src ./include | ||
do | ||
for EXT in cpp h hpp cu | ||
do | ||
for FILE in $(find ${DIR} -name *.${EXT}) | ||
do | ||
echo "hipifying $FILE in-place" | ||
hipify-perl $FILE -inplace & | ||
done | ||
done | ||
done | ||
|
||
echo "waiting for all hipify-perl invocations to finish" | ||
wait |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/*! | ||
* Copyright (c) 2021 Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE file in the project root for | ||
* license information. | ||
*/ | ||
#ifdef USE_CUDA | ||
|
||
#if defined(__HIP_PLATFORM_AMD__) || defined(__HIP__) | ||
// ROCm doesn't have __shfl_down_sync, only __shfl_down without mask. | ||
// Since mask is full 0xffffffff, we can use __shfl_down instead. | ||
#define __shfl_down_sync(mask, val, offset) __shfl_down(val, offset) | ||
#define __shfl_up_sync(mask, val, offset) __shfl_up(val, offset) | ||
// ROCm warpSize is constexpr and is either 32 or 64 depending on gfx arch. | ||
#define WARPSIZE warpSize | ||
StrikerRUS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// ROCm doesn't have atomicAdd_block, but it should be semantically the same as atomicAdd | ||
#define atomicAdd_block atomicAdd | ||
#else | ||
// CUDA warpSize is not a constexpr, but always 32 | ||
#define WARPSIZE 32 | ||
#endif | ||
|
||
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.