Function: float_to_float16
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Converts data of the float32 type to data of the aclFloat16 type.
Prototype
- C Prototype
1aclFloat16 aclFloatToFloat16(float value)
- Python Function
1output = acl.float_to_float16(value)
Parameters
Parameter |
Description |
|---|---|
value |
float: data to be converted. |
Return Value
Return Value |
Description |
|---|---|
output |
Int, error code. 0 on success; else, failure. |
Parent topic: Other APIs