moved half support to a source file
Change-Id: I7c09b41877e22c1b743dea25a585e5307427dafd
Tá an tiomantas seo le fáil i:
1 tuismitheoir
4a6ebce880
tiomantas
38720f8a4e
5 comhad athraithe
+428
-273
Níor tháinig aon chomhaid le do chuardach
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir