Closed zzzDavid closed 3 years ago
@zzzDavid I remember you implemented something? You can contribute if you'd like.
Yes, I implemented a bitcast()
API in python/heterocl/compute_api.py
and corresponding tests.
It's in the heteroflow branch now:
https://github.com/zzzDavid/heterocl/blob/heteroflow/python/heterocl/compute_api.py#L971
Could you extract that part of the code and create a separate PR? Thanks.
Sure, the new PR is: https://github.com/cornell-zhang/heterocl/pull/330
This issue is to document bitcast operation which is not directly exposed to user.
Description
FlexCNN uses 512-bit bus to transport packed 32-bit raw bits, which is casted to 32-bit floating point data upon computation. In this case, we need support for bitcast operation.
Note
hcl.cast()
is cast by value, meaning uint0010
would be converted to2.0f
. Bitcast operation is available in HeteroCL but not directly exposed to user: check this example.