This implements the trivial change needed to move back from the hip{Something}_{x, y, z} macros to the natural CUDA syntax of Something.{x, y, z}. This is contained in lines 384-404 in hip_runtime.h. All of the other changes have to do with changing unit tests to use this syntax. The macros are retained for backwards compatibility.
This commit is contained in:
@@ -35,7 +35,7 @@ __global__ void vmac_asm(hipLaunchParm lp,
|
||||
float *out,
|
||||
float *in)
|
||||
{
|
||||
int i = hipBlockDim_x * hipBlockIdx_x + hipThreadIdx_x;
|
||||
int i = blockDim.x * blockIdx.x + threadIdx.x;
|
||||
|
||||
asm volatile ("v_mac_f32_e32 %0, %2, %3" : "=v" (out[i]) : "0"(out[i]), "v" (a), "v" (in[i]));
|
||||
}
|
||||
@@ -47,7 +47,7 @@ void CPUReference(
|
||||
{
|
||||
for(unsigned int j=0; j < NUM; j++)
|
||||
{
|
||||
|
||||
|
||||
output[j]= a*input[j] + output[j];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user