Open steven-johnson opened 5 years ago
Did this get addressed as part of https://github.com/halide/Halide/pull/3667?
Hrm, no I don't think so, because float16_t is still defined in libHalide, not in the runtime. So you can use it as long as you link libHalide, (and type_of is defined there), which is not super useful unless you're jitting. We could consider making the float16 implementation in Float16.h/Float16.cpp part of the runtime too.
Could we just add types to HalideRuntime.h
that are strictly proxies for halide_type_of<>() for float16 and bfloat16?
That would be great!
Bump.
We could consider making the float16 implementation in Float16.h/Float16.cpp part of the runtime too.
Yeah, but that would require adding a fair amount of new runtime API surface area -- and a very C++-centric surface area, at that.
Thought: maybe we could add it as a new extra runtime header (HalideRuntimeFloat16.h?), so HalideRuntime.h doesn't get clogged with it? (This would require making an efficient header-only version of it, which might be tricky to do given the large data table in the .cpp file...)
Hello All,
Is it possible to do this now for fp16 data type
Halide::Runtime::Buffer
Halide::float16_t
is a compiletime type, but there is no equivalent runtime type, and thus no overload forhalide_type_of<>()
which producesFloat(16)
. You can of course work around this by using a dynamically-typed buffer, but static typing is good, so we should remedy this somehow.