Hi, I have an allocated DLTensor, which like this:
const int dtype_code = kDLFloat;
const int dtype_bits = 32;
const int dtype_bits_fp16 = 32;
if (is_fp16) {
const int dtype_bits_fp16 = 16;
printf("fp16 mode enabled.\n");
}
const int dtype_lanes = 1;
const int device_type = kDLCPU;
const int device_id = 0;
TVMArrayAlloc(shape_coeff, ndim, dtype_code, dtype_bits_fp16, dtype_lanes,
device_type, device_id, &coeff);
I have enabled the fp16, then I want assign values to coefficient
,
how should I do that? c++ doesn’t support fp16