Support of IEEE single and double precision floating point operations
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
Hello everyone,
I just want to confirm the status of supporting IEEE single and double precision floating point operations in CIRCT and if it is on the roadmap.
I was playing around with the handshake integration test and changed the data type to f64 (see attached) and I am getting the following errors:
matmul_std_lin_float.mlir:3:17: error: unsupported data type ''f64''
%c123_f64 = arith.constant 123.0 : f64
^
matmul_std_lin_float.mlir:3:17: error: unsupported data type ''f64''
%c123_f64 = arith.constant 123.0 : f64
^
matmul_std_lin_float.mlir:3:17: error: only memrefs of signless ints are supported
%c123_f64 = arith.constant 123.0 : f64
^
matmul_std_lin_float.mlir:3:17: note: see current operation: %2:4 = "handshake.memory"(%164, %163, %456, %455, %470) {id = 2 : i32, ldCount = 1 : i32, lsq = false, memRefType = memref<64xf64>, stCount = 2 : i32} : (f64, index, f64, index, index) -> (f64, none, none, none)
matmul_std_lin_float.mlir:3:17: error: unsupported operation type
%c123_f64 = arith.constant 123.0 : f64
^
matmul_std_lin_float.mlir:3:17: note: see current operation: %2:4 = "handshake.memory"(%164, %163, %456, %455, %470) {id = 2 : i32, ldCount = 1 : i32, lsq = false, memRefType = memref<64xf64>, stCount = 2 : i32} : (f64, index, f64, index, index) -> (f64, none, none, none)
matmul_std_lin_float.mlir:2:3: error: failed to legalize operation 'handshake.func' that was explicitly marked illegal
func @top() -> f64 {
^
matmul_std_lin_float.mlir:2:3: note: see current operation: "handshake.func"() ({
^bb0(%arg0: none):
}) {argNames = ["inCtrl"], resNames = ["out0", "outCtrl"], sym_name = "top", type = (none) -> (f64, none)} : () -> ()
matmul_std_lin_float.mlir:2:3: error: 'handshake.func' op error during conversion
func @top() -> f64 {
^
matmul_std_lin_float.mlir:2:3: note: see current operation: "handshake.func"() ({
^bb0(%arg0: none):
}) {argNames = ["inCtrl"], resNames = ["out0", "outCtrl"], sym_name = "top", type = (none) -> (f64, none)} : () -> ()
Of course I could just have a syntax error or not be using the arith.constant operator correctly so any feedback would be greatly appreciated.
Best regards,
Juan
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the handshake integration test and the attached matmul_std_lin_float.mlir input, then trace the reported f64 failures through handshake legalization. Review the current handling of arith.constant, floating-point values, and handshake.memory; done means the issue’s IEEE single- and double-precision example is accepted without the reported unsupported-type and legalization errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100