forked from Samsung/ONE
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[res] Add mx type BatchMatMul recipes (Samsung#14309)
This adds mx type BMM recipes. ONE-DCO-1.0-Signed-off-by: Hyukjin Jeong <[email protected]>
- Loading branch information
1 parent
cff337a
commit 4c27b54
Showing
2 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
operand { | ||
name: "ifm1" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operand { | ||
name: "ifm2" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operand { | ||
name: "ifm1_mxfp4" | ||
type: MXFP4 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operand { | ||
name: "ifm2_mxfp4" | ||
type: MXFP4 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operand { | ||
name: "ofm_mxfp4" | ||
type: MXFP4 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operation { | ||
type: "Quantize" | ||
input: "ifm1" | ||
output: "ifm1_mxfp4" | ||
} | ||
operation { | ||
type: "Quantize" | ||
input: "ifm2" | ||
output: "ifm2_mxfp4" | ||
} | ||
operation { | ||
type: "BatchMatMul" | ||
input: "ifm1_mxfp4" | ||
input: "ifm2_mxfp4" | ||
output: "ofm_mxfp4" | ||
batch_matmul_options { | ||
adjoint_lhs: false | ||
adjoint_rhs: false | ||
} | ||
} | ||
operation { | ||
type: "Dequantize" | ||
input: "ofm_mxfp4" | ||
output: "ofm" | ||
} | ||
input: "ifm1" | ||
input: "ifm2" | ||
output: "ofm" | ||
|
59 changes: 59 additions & 0 deletions
59
res/CircleRecipes/CircleBatchMatMul_MXINT8_000/test.recipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
operand { | ||
name: "ifm1" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operand { | ||
name: "ifm2" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operand { | ||
name: "ifm1_mxint8" | ||
type: MXINT8 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operand { | ||
name: "ifm2_mxint8" | ||
type: MXINT8 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operand { | ||
name: "ofm_mxint8" | ||
type: MXINT8 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 1 dim: 32 dim: 32 } | ||
} | ||
operation { | ||
type: "Quantize" | ||
input: "ifm1" | ||
output: "ifm1_mxint8" | ||
} | ||
operation { | ||
type: "Quantize" | ||
input: "ifm2" | ||
output: "ifm2_mxint8" | ||
} | ||
operation { | ||
type: "BatchMatMul" | ||
input: "ifm1_mxint8" | ||
input: "ifm2_mxint8" | ||
output: "ofm_mxint8" | ||
batch_matmul_options { | ||
adjoint_lhs: false | ||
adjoint_rhs: false | ||
} | ||
} | ||
operation { | ||
type: "Dequantize" | ||
input: "ofm_mxint8" | ||
output: "ofm" | ||
} | ||
input: "ifm1" | ||
input: "ifm2" | ||
output: "ofm" | ||
|