should work if we compile it together on the AMD machin in the cloud
This commit is contained in:
10
kernels/kernels.hip
Normal file
10
kernels/kernels.hip
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <hip/hip_runtime.h>
|
||||
|
||||
extern "C" __global__
|
||||
void saxpy(float* y, const float* x, float a, int n) {
|
||||
int i = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (i < n) {
|
||||
y[i] += a * x[i];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user