-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Enable AMD GPU support. #3795
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
Conversation
@@ -141,6 +150,7 @@ def main(): | |||
parser.add_argument("-t", "--build-type", | |||
metavar="BUILD_TYPE", default="Release", help="build type: Debug, Release") | |||
parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA") | |||
parser.add_argument("--rocm", action='store_true', help="swith from OpenCL to ROCM") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@malixian, one note.
As of today, we don't have AMD GPU HW in our CI system, so we won't be able to validate that other contributions do not break ROCM support.
I think we should decide ASAP, how ROCM support is going to be verified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is indeed a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least for plugin we can use hip<->cuda source code compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking changes are not allowed. Please, fix backend
enum.
@malixian, thanks for contribution! Please update documentation, https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md at least. |
All right. |
We update the code and GetStartedGuide.md document for AMDGPU. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per discussion with @bader, adding & committing 3 suggestions (tested locally) to:
- Apply the Driver LIT patch correctly to pass the checks
- Remove
__SYCL_AMDGCN__
macro due to the similar efforts for__SYCL_NVPTX__
in [SYCL] Remove the __SYCL_NVPTX__ macro #3977
Fixed comments.
If |
|
Enable AMG GPU for DPC++. To support this feature, We did two parts of development, namely the compilation tool chain and the runtime. We have implemented rocm-plugin refer to cuda-plugin. Many test cases in this project have passed, but there are still some problems which can be roughly divided into three areas:
First, some errors occurred at link time. like all-pairs-disance-sycl case occurred error:
undefined hidden symbol: __spirv_ControlBarrier will appear during the lld link period
due to usebarrier(access::fence_space::local_space)
. Similarly, theundefined__spirv_SubgroupShuffleINTEL
error occurs when thecl::sycl::atomic
keyword is used at that time.Second, some errors occurred at runime. the program will core dump when calling
hipMemcpyDtoHAsync
API due to allocating memory size is too large. But cuda does not have this problem.Finally, calculation accuracy problem. Currently, the calculation of
float
type kernel functions is inaccurate, and there is no problem withint
type testing. We haven't figured out where the problem is.We will keep track of the above issues.