[all-commits] [llvm/llvm-project] d0b312: [libomptarget] Implement host plugin for amdgpu
Jon Chesterfield via All-commits
all-commits at lists.llvm.org
Sat Aug 15 15:58:48 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d0b312955f12beba5b03c8a524a8456cb4174bd7
https://github.com/llvm/llvm-project/commit/d0b312955f12beba5b03c8a524a8456cb4174bd7
Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
Date: 2020-08-15 (Sat, 15 Aug 2020)
Changed paths:
M openmp/libomptarget/plugins/CMakeLists.txt
A openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
A openmp/libomptarget/plugins/amdgpu/impl/atmi.cpp
A openmp/libomptarget/plugins/amdgpu/impl/atmi.h
A openmp/libomptarget/plugins/amdgpu/impl/atmi_interop_hsa.cpp
A openmp/libomptarget/plugins/amdgpu/impl/atmi_interop_hsa.h
A openmp/libomptarget/plugins/amdgpu/impl/atmi_kl.h
A openmp/libomptarget/plugins/amdgpu/impl/atmi_runtime.h
A openmp/libomptarget/plugins/amdgpu/impl/data.cpp
A openmp/libomptarget/plugins/amdgpu/impl/data.h
A openmp/libomptarget/plugins/amdgpu/impl/internal.h
A openmp/libomptarget/plugins/amdgpu/impl/machine.cpp
A openmp/libomptarget/plugins/amdgpu/impl/machine.h
A openmp/libomptarget/plugins/amdgpu/impl/msgpack.cpp
A openmp/libomptarget/plugins/amdgpu/impl/msgpack.def
A openmp/libomptarget/plugins/amdgpu/impl/msgpack.h
A openmp/libomptarget/plugins/amdgpu/impl/rt.h
A openmp/libomptarget/plugins/amdgpu/impl/system.cpp
A openmp/libomptarget/plugins/amdgpu/impl/utils.cpp
A openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
M openmp/libomptarget/src/rtl.cpp
Log Message:
-----------
[libomptarget] Implement host plugin for amdgpu
[libomptarget] Implement host plugin for amdgpu
Replacement for D71384. Primary difference is inlining the dependency on atmi
followed by extensive simplification and bugfixes. This is the latest version
from https://github.com/ROCm-Developer-Tools/amd-llvm-project/tree/aomp12 with
minor patches and a rename from hsa to amdgpu, on the basis that this can't be
used by other implementations of hsa without additional work.
This will not build unless the ROCM_DIR variable is passed so won't break other
builds. That variable is used to locate two amdgpu specific libraries that ship
as part of rocm:
libhsakmt at https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface
libhsa-runtime64 at https://github.com/RadeonOpenCompute/ROCR-Runtime
These libraries build from source. The build scripts in those repos are for
shared libraries, but can be adapted to statically link both into this plugin.
There are caveats.
- This works well enough to run various tests and benchmarks, and will be used
to support the current clang bring up
- It is adequately thread safe for the above but there will be races remaining
- It is not stylistically correct for llvm, though has had clang-format run
- It has suboptimal memory management and locking strategies
- The debug printing / error handling is inconsistent
I would like to contribute this pretty much as-is and then improve it in-tree.
This would be advantagous because the aomp12 branch that was in use for fixing
this codebase has just been joined with the amd internal rocm dev process.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D85742
More information about the All-commits
mailing list