feat(rocthrust): allow grafting thrust onto benchmarks - #8538
Conversation
|
This pull request has been inactive for 25 days and will be marked as stale. If you would like to keep this PR open, please:
This PR will be automatically closed in 5 days if no further activity occurs. |
53cfd86 to
e44e57b
Compare
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
|
All the code changes look correct to me, thanks. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8538 +/- ##
===========================================
- Coverage 64.20% 64.20% -0.00%
===========================================
Files 2761 2761
Lines 450031 450035 +4
Branches 66215 66215
===========================================
- Hits 288929 288927 -2
- Misses 140236 140240 +4
- Partials 20866 20868 +2
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
NguyenNhuDi
left a comment
There was a problem hiding this comment.
Using -DCODE_COVERAGE=ON -DBUILD_TEST=ON -DBUILD_BENCHMARK=ON while compiling for rocThrust I am getting the following error:
lld: error: undefined symbol: __llvm_profile_instrument_gpu
>>> referenced by /tmp/testframework-gfx1201-84f2d8.o:(dummy_kernel())
>>> referenced by /tmp/testframework-gfx1201-84f2d8.o:(dummy_kernel())
clang++: error: amdgcn-link command failed with exit code 1 (use -v to see invocation)
failed to execute:/opt/rocm/lib/llvm/bin/clang++ --offload-arch=gfx1201 -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_HIP -DTHRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_CPP -DUSE_LIBCUDACXX -DUSE_LIBHIPCXX -DUSE_PROF_API=1 -D__HIP_PLATFORM_AMD__=1 -I/dockerx/rocm-libraries/projects/rocthrust/build/thrust/include -I/dockerx/rocm-libraries/projects/rocthrust/thrust/.. -isystem /dockerx/rocm-libraries/projects/rocthrust/testing -isystem /dockerx/rocm-libraries/projects/rocthrust/build/_deps/googletest-src/googletest/include -isystem /dockerx/rocm-libraries/projects/rocthrust/build/_deps/googletest-src/googletest -w --offload-compress -Wno-unused-command-line-argument -O0 -fprofile-instr-generate -fcoverage-mapping -O3 -DNDEBUG -std=c++17 -Wall -Wextra -x hip -MD -MT testing/CMakeFiles/testframework.dir/unittest/hip/testframework.cu.o -MF CMakeFiles/testframework.dir/unittest/hip/testframework.cu.o.d -o "CMakeFiles/testframework.dir/unittest/hip/testframework.cu.o" -c /dockerx/rocm-libraries/projects/rocthrust/testing/unittest/hip/testframework.cu
make[2]: *** [testing/CMakeFiles/testframework.dir/build.make:90: testing/CMakeFiles/testframework.dir/unittest/hip/testframework.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
lld: error: undefined symbol: __llvm_profile_instrument_gpu
>>> referenced by /tmp/test_unique_ptr_allocate_deallocate-gfx1201-a1b802.o:(void thrust::THRUST_200805_400400_NS::hip_rocprim::__parallel_for::kernel<256u, thrust::THRUST_200805_400400_NS::hip_rocprim::for_each_f<thrust::THRUST_200805_400400_NS::device_ptr<A>, thrust::THRUST_200805_400400_NS::detail::wrapped_function<thrust::THRUST_200805_400400_NS::default_delete<A, void>::operator()(thrust::THRUST_200805_400400_NS::device_ptr<A>) const::'lambda'(A&), void>>, int, 1u>(thrust::THRUST_200805_400400_NS::hip_rocprim::for_each_f<thrust::THRUST_200805_400400_NS::device_ptr<A>, thrust::THRUST_200805_400400_NS::detail::wrapped_function<thrust::THRUST_200805_400400_NS::default_delete<A, void>::operator()(thrust::THRUST_200805_400400_NS::device_ptr<A>) const::'lambda'(A&), void>>, int, int))
>>> referenced by /tmp/test_unique_ptr_allocate_deallocate-gfx1201-a1b802.o:(void thrust::THRUST_200805_400400_NS::hip_rocprim::__parallel_for::kernel<256u, thrust::THRUST_200805_400400_NS::hip_rocprim::for_each_f<thrust::THRUST_200805_400400_NS::device_ptr<A>, thrust::THRUST_200805_400400_NS::detail::wrapped_function<thrust::THRUST_200805_400400_NS::default_delete<A, void>::operator()(thrust::THRUST_200805_400400_NS::device_ptr<A>) const::'lambda'(A&), void>>, int, 1u>(thrust::THRUST_200805_400400_NS::hip_rocprim::for_each_f<thrust::THRUST_200805_400400_NS::device_ptr<A>, thrust::THRUST_200805_400400_NS::detail::wrapped_function<thrust::THRUST_200805_400400_NS::default_delete<A, void>::operator()(thrust::THRUST_200805_400400_NS::device_ptr<A>) const::'lambda'(A&), void>>, int, int))
>>> referenced by /tmp/test_unique_ptr_allocate_deallocate-gfx1201-a1b802.o:(void thrust::THRUST_200805_400400_NS::hip_rocprim::__parallel_for::kernel<256u, thrust::THRUST_200805_400400_NS::hip_rocprim::for_each_f<thrust::THRUST_200805_400400_NS::device_ptr<A>, thrust::THRUST_200805_400400_NS::detail::wrapped_function<thrust::THRUST_200805_400400_NS::default_delete<A, void>::operator()(thrust::THRUST_200805_400400_NS::device_ptr<A>) const::'lambda'(A&), void>>, int, 1u>(thrust::THRUST_200805_400400_NS::hip_rocprim::for_each_f<thrust::THRUST_200805_400400_NS::device_ptr<A>, thrust::THRUST_200805_400400_NS::detail::wrapped_function<thrust::THRUST_200805_400400_NS::default_delete<A, void>::operator()(thrust::THRUST_200805_400400_NS::device_ptr<A>) const::'lambda'(A&), void>>, int, int))
>>> referenced 41 more times
239cd9a to
b76aa95
Compare
Ah, weird. I think something must have gone wrong during a rebase, or conflict resolution. Should be resolved with b76aa95. |
Motivation
Allows compilation of rocThrust benchmark with non-rocThrust libraries by adding some required compatibility layer and including said non-rocThrust header-only library.
Required by #8499.
JIRA ID : AIPRIMS-208
Technical Details
I've added a CMakePresets.json because putting the required flags in CMakeLists.txt is not the way to go. This also isn't user-facing so I don't want to include this in user facing documentation.
Test Plan
It's a secret.
Test Result
Works on my machine.
Submission Checklist