alpaka icon indicating copy to clipboard operation
alpaka copied to clipboard

Add test using CUDA/HIP at the same time

Open bernhardmgruber opened this issue 2 years ago • 0 comments

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

bernhardmgruber avatar Apr 06 '22 09:04 bernhardmgruber