@@ -10,12 +10,6 @@ __global__ void float_kernel_stochastic(float* __restrict__ a,
10
10
int exp_bits) {
11
11
int index = blockIdx .x * blockDim .x + threadIdx .x ;
12
12
if (index < size) {
13
- // unsigned int old_num = FLOAT_TO_BITS(&a[index]);
14
- // unsigned int rand_prob = (unsigned int) r[index];
15
- // unsigned int quantize = round_bitwise_stochastic(old_num, rand_prob, man_bits);
16
- // quantize = clip_exponent(exp_bits, man_bits, old_num, quantize);
17
- // float quantize_float = BITS_TO_FLOAT(&quantize);
18
- // o[index] = quantize_float;
19
13
unsigned int rand_prob = (unsigned int ) r[index ];
20
14
unsigned int target,quantize_bits;
21
15
target = FLOAT_TO_BITS (&a[index ]);
@@ -50,12 +44,6 @@ __global__ void float_kernel_nearest(float* __restrict__ a,
50
44
int exp_bits) {
51
45
int index = blockIdx .x * blockDim .x + threadIdx .x ;
52
46
if (index < size) {
53
-
54
- // unsigned int old_num = FLOAT_TO_BITS(&a[index]);
55
- // unsigned int quantize = round_bitwise_nearest(old_num, man_bits);
56
- // quantize = clip_exponent(exp_bits, man_bits, old_num, quantize);
57
- // float quantize_float = BITS_TO_FLOAT(&quantize);
58
- // o[index] = quantize_float;
59
47
unsigned int target,quantize_bits;
60
48
target = FLOAT_TO_BITS (&a[index ]);
61
49
float quantized;
0 commit comments