Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-09 02:22:22

0001 #include <cstddef>
0002 
0003 #include <hip/hip_runtime.h>
0004 
0005 #include "HeterogeneousTest/ROCmDevice/interface/DeviceAddition.h"
0006 #include "HeterogeneousCore/ROCmUtilities/interface/hipCheck.h"
0007 
0008 #include "ROCmTestDeviceAdditionAlgo.h"
0009 
0010 namespace HeterogeneousTestROCmDevicePlugins {
0011 
0012   __global__ void kernel_add_vectors_f(const float* __restrict__ in1,
0013                                        const float* __restrict__ in2,
0014                                        float* __restrict__ out,
0015                                        size_t size) {
0016     cms::rocmtest::add_vectors_f(in1, in2, out, size);
0017   }
0018 
0019   void wrapper_add_vectors_f(const float* __restrict__ in1,
0020                              const float* __restrict__ in2,
0021                              float* __restrict__ out,
0022                              size_t size) {
0023     kernel_add_vectors_f<<<32, 32>>>(in1, in2, out, size);
0024     hipCheck(hipGetLastError());
0025   }
0026 
0027 }  // namespace HeterogeneousTestROCmDevicePlugins