In this implementation of `GetDataSize()`:

https://github.com/apache/tvm/blob/58716081637fdf21bdae44122086f1dbc35f7c35/include/tvm/runtime/ndarray.h#L316

there is this mysterious line:
```
size *= (arr.dtype.bits * arr.dtype.lanes + 7) / 8;
```

I was instead expecting the simpler:
```
size *= (arr.dtype.bits * arr.dtype.lanes);
```

Can somebody enlighten me as to why the former line (+7 / 8) is doing? Thanks!





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/ndarray-h-getdatasize-question/11485/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/7f899fc7bc412573a4778e5a4053c2ecd506f3a9558617bab061ec5cd43493c7).

Reply via email to