moved half support to a source file
Change-Id: I7c09b41877e22c1b743dea25a585e5307427dafd
[ROCm/clr commit: 38720f8a4e]
This commit is contained in:
zatwierdzone przez
Maneesh Gupta
rodzic
29c5bf181a
commit
cf3186cd63
@@ -28,15 +28,15 @@ __global__ void half_scale_kernel(hipLaunchParm lp, float *din, float *dout, int
|
||||
|
||||
int idx = hipThreadIdx_x+ hipBlockDim_x*hipBlockIdx_x;
|
||||
if (idx < dsize){
|
||||
__half scf = cvt_float_to_half(SCF);
|
||||
__half kin = cvt_float_to_half(din[idx]);
|
||||
__half scf = __float2half(SCF);
|
||||
__half kin = __float2half(din[idx]);
|
||||
__half kout;
|
||||
|
||||
kout = __hmul(kin, scf);
|
||||
|
||||
// kout = cvt_float_to_half(cvt_half_to_float(kin)*cvt_half_to_float(scf));
|
||||
|
||||
dout[idx] = cvt_half_to_float(kout);
|
||||
dout[idx] = __half2float(kout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user