feat(javascript): add float16 support#3253
Conversation
|
Hey @chaokunyang @theweipeng |
|
Hi@ayush00git, thansk for opening up this PR. I think we need real float16 isntead of fallbakcing to float32 |
Hey @chaokunyang |
|
Hey @chaokunyang @theweipeng |
|
@ayush00git could you add float16 array support in this pr? |
Yaa sure, i'll add the arrays support |
|
Hey @chaokunyang CodegenRegistry.register(TypeId.FLOAT16_ARRAY, build(Type.float16()));Still I've added separate tests for |
|
Hey @chaokunyang |
Why?
Javascript package had the
float16support but during serialization it fallbacks tofloat32, much like thefloat16was just a pseudo type which in real was afloat32.What does this PR do?
1. Adds float16(v: number | string) method to the
BinaryWriterBuilderclass2. Updated the
float16accessor in the Codegen Regsitery3. Updated the
writer/number.tsand addedfloat16test suites intest/number.test.tsRelated Issue
Does this PR introduce any user-facing change?
Benchmark
N/A