Closed Jiahui17 closed 3 months ago
This is partially related to a comment in #117
Benchmarks (non-exhausive):
gsum.c
gsumif.c
matching.c
handshake_export.mlir
%31 = constant %30 {handshake.bb = 2 : ui32, handshake.name = "constant11", value = 0.699999988 : f32} : <f32>
hw.mlir
%constant11.outs = hw.instance "constant11" @handshake_constant_1(ctrl: %source3.outs: !handshake.control<>, clk: %clk: i1, rst: %rst: i1) -> (outs: !handshake.channel<i32>) ... hw.module.extern @handshake_constant_1(in %ctrl : !handshake.control<>, in %clk : i1, in %rst : i1, out outs : !handshake.channel<i32>) attributes {hw.name = "handshake.constant", hw.parameters = {DATA_WIDTH = 32 : ui32, VALUE = "00000000000000000000000000000000"}}
In handshake_export.mlir:
%53 = constant %52 {handshake.bb = 3 : ui32, handshake.name = "constant7", value = 1.000000e+00 : f32} : <f32>
In hw.mlir:
%constant7.outs = hw.instance "constant7" @handshake_constant_3(ctrl: %source2.outs: !handshake.control<>, clk: %clk: i1, rst: %rst: i1) -> (outs: !handshake.channel<i32>) ... hw.module.extern @handshake_constant_3(in %ctrl : !handshake.control<>, in %clk : i1, in %rst : i1, out outs : !handshake.channel<i32>) attributes {hw.name = "handshake.constant", hw.parameters = {DATA_WIDTH = 32 : ui32, VALUE = "00000000000000000000000000000001"}}
Here a floating-point constant 1.0 is mapped to an integer 1.
This is partially related to a comment in #117
Benchmarks (non-exhausive):
gsum.c
,gsumif.c
, etc. (anything with a constant node holding an FP value).matching.c
.Issue 1:
handshake_export.mlir
hw.mlir
Issue 2:
In
handshake_export.mlir
:In
hw.mlir
:Here a floating-point constant 1.0 is mapped to an integer 1.