Hi, I have a DLTensor which malloc like this:

```
int dtype_code = kDLFloat;
  int dtype_bits_16 = 16;
  int dtype_lanes = 1;
  int device_type = kDLCPU;
  int device_id = 0;

  int64_t shape_coff[2] = {batch, 4};

  TVMArrayAlloc(shape_coff, 2, dtype_code, dtype_bits_16, dtype_lanes,
                device_type, device_id, &coeff);
```

How should I write data into this memory field? My data is calculate from float,
if using float assign values, the values readout is wrong.

I am confused on how to write data to a fp16 Tensor? Does anybody knows how?





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/how-to-copy-data-to-a-fp16-dltensor/12397/1)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/5d618d05755a23c51887ba1f5dfaf148ead2deb571db540705ffa9475dfe92e0).

Reply via email to