alpaka
alpaka copied to clipboard
Add test using CUDA/HIP at the same time
As discussed this morning, a test for this functionality is available at https://github.com/fwyzard/test-rocm-cuda-alpaka .
With the current develop
branch (actually with #1678 to make the explicit types available), the test fails with
ROCm runtime initialised
CUDA runtime initialised
CPU-only serial runtime initialised
device: Radeon Pro WX 9100
accelerator: AccGpuHipRt<1,j>
result: 10
ROCm kernel ran successfully
device: NVIDIA GeForce GTX 1080 Ti
accelerator: AccGpuCudaRt<1,j>
result: 10
terminate called after throwing an instance of 'std::runtime_error'
what(): alpaka/include/alpaka/mem/buf/BufUniformCudaHipRt.hpp(249) 'hipFree(ptr)' returned error : 'hipErrorInvalidValue': 'hipErrorInvalidValue'!
Aborted (core dumped)
With this #1665 (this PR), the test passes with
ROCm runtime initialised
CUDA runtime initialised
CPU-only serial runtime initialised
device: Radeon Pro WX 9100
accelerator: AccGpuHipRt<1,j>
result: 10
ROCm kernel ran successfully
device: NVIDIA GeForce GTX 1080 Ti
accelerator: AccGpuCudaRt<1,j>
result: 10
CUDA kernel ran successfully
device: AMD Ryzen 9 5900X 12-Core Processor
accelerator: AccCpuSerial<1,j>
result: 10
CPU-only serial kernel ran successfully
Originally posted by @fwyzard in https://github.com/alpaka-group/alpaka/issues/1665#issuecomment-1088511534