| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][tosa] Add support for cast_from/to_block_scaled (#163436) This commit adds support for the cast_from/to_block_scaled operations from the ext-mxfp extension. This includes: - Operation definition in TosaOps.td - Micro-scaling supported types definition - Shape inference and verifiers - Validation pass checks to ensure usage is only valid when the target environment includes ext-mxfp and at least v1.1.draft of the specification. Note: currently it excludes support for mxint8. This will be added in a later commit. Note: this commit adds support as defined in the spec in https://github.com/arm/tosa-specification/commit/063846a75b9687ab01e58cb3538472bffb3a03b0. EXT_MXFP extension is considered experimental and subject to breaking change. Co-authored-by: Tat Wai Chong <tatwai.chong@arm.com> | 9 个月前 | |
[mlir][tosa] Fix select folder when operands are broadcast (#165481) This commit addresses a crash in the dialects folder. The currently folder assumes no broadcasting of the input operand happens and therefore the folder can complain that the returned value was not the same shape as the result. For now, this commit ensures no folding happens when broadcasting is involved. In the future, folding with a broadcast could likely be supported by inserting a tosa.tile operation before returning the operand. This type of transformation is likely better suited for a canonicalization pass. This commit only aims to avoid the crash. | 8 个月前 | |
[mlir][tosa] Remove Tosa MulOp Commutative attribute (#163312) The patch motivates by following cases in Tosa Conformance Test. conformance/operators/ew_binary/mul/mul_21x44_i8_perm0_shift0_dyn conformance/operators/ew_binary/mul/mul_44x57_i16_perm0_shift0_dyn conformance/operators/ew_binary/mul/mul_52x31_i32_perm0_shift8_dyn Shift operand could be non-constant when dynamic extension enabled. With Commutative attribute, all the operands would be treated as commutative. Shift operand could be reordered with one of the MulOp inputs incorrectly in above cases. Would there have better way to fix the issue? | 9 个月前 | |
[mlir][tosa] Update value to values for ConstOp and ConstShapeOp (#129943) Updated the dialect to match TOSA v1.0 specification for ConstOp and ConstShapeOp (https://www.mlplatform.org/tosa/tosa_spec.html#_const). Also updated lit tests --------- Signed-off-by: Jerry Ge <jerry.ge@arm.com> | 1 年前 | |
[mlir][vector] Support complete folding in single pass for vector.insert/vector.extract (#142124) ### Description This patch improves the folding efficiency of vector.insert and vector.extract operations by not returning early after successfully converting dynamic indices to static indices. This PR also renames the test pass TestConstantFold to TestSingleFold and adds comprehensive documentation explaining the single-pass folding behavior. ### Motivation Since the OpBuilder::createOrFold function only calls fold **once**, the current fold methods of vector.insert and vector.extract may leave the op in a state that can be folded further. For example, consider the following un-folded IR: %v1 = vector.insert %e1, %v0 [0] : f32 into vector<128xf32> %c0 = arith.constant 0 : index %e2 = vector.extract %v1[%c0] : f32 from vector<128xf32> If we use createOrFold to create the vector.extract op, then the result will be: %v1 = vector.insert %e1, %v0 [127] : f32 into vector<128xf32> %e2 = vector.extract %v1[0] : f32 from vector<128xf32> But this is not the optimal result. createOrFold should have returned %e1. The reason is that the execution of fold returns immediately after extractInsertFoldConstantOp, causing subsequent folding logics to be skipped. --------- Co-authored-by: Yang Bai <yangb@nvidia.com> | 1 年前 | |
[mlir][tosa] Add expected output shape check to argmax verifier (#129870) Fixes some test cases which incorrectly declared the output shape and added a negative test case. Signed-off-by: Luke Hutton <luke.hutton@arm.com> | 1 年前 | |
[MLIR][TOSA] Update IfOp print/parse to support ranked condition tens… (#149791) …or and optional block arguments This change extends the TOSA cond_if operation's print and parse logic to handle the following: - The condition operand may now have any rank, as long as the total number of elements sums to 1. %1 = tosa.cond_if %0 : tensor<1x1x1xi1> -> tensor<4xf32> - The then and else regions can now include optional block arguments. The updated IR syntax reflects this: %1 = tosa.cond_if %0 (%arg2 = %arg0, %arg3 = %arg1) : tensor<i1> (tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32> - Removed parentheses around single result types in the printed representation, aligning with the AsmPrinter conventions. Co-authored-by: Luke Hutton <luke.hutton@arm.com> | 1 年前 | |
[mlir][tosa] Add the concept of a TOSA target environment (#153771) This commit introduces a new module-level attribute tosa.target_env. It encapsulates target information for use during compilation such as: level, profiles and extensions. For example: mlir module attributes {tosa.target_env = #tosa.target_env<level = none, profiles = [pro_int], extensions = [int16, int4]>} { <my-tosa-program> } Previously the validation pass accepted target information as a series of command line pass options. This commit changes the behaviour to query the attached target environment from the module attribute. This refactoring allows other passes to query the same target information. A new target environment can be attached using the --tosa-attach-target pass, which takes the same command line options as the previous validation pass arguments. For example: bash mlir-opt --tosa-attach-target="profiles=pro_int extensions=int4,int16 level=none" test.mlir | 9 个月前 | |
[mlir][tosa] Add the concept of a TOSA target environment (#153771) This commit introduces a new module-level attribute tosa.target_env. It encapsulates target information for use during compilation such as: level, profiles and extensions. For example: mlir module attributes {tosa.target_env = #tosa.target_env<level = none, profiles = [pro_int], extensions = [int16, int4]>} { <my-tosa-program> } Previously the validation pass accepted target information as a series of command line pass options. This commit changes the behaviour to query the attached target environment from the module attribute. This refactoring allows other passes to query the same target information. A new target environment can be attached using the --tosa-attach-target pass, which takes the same command line options as the previous validation pass arguments. For example: bash mlir-opt --tosa-attach-target="profiles=pro_int extensions=int4,int16 level=none" test.mlir | 9 个月前 | |
[mlir][tosa] Change axis to I32Attr This patch changes axis attribute type from I64Attr to I32Attr to match the TOSA spec. Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I88416f0b102f8ac2191da63a3fbce25759f19613 Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D157424 | 2 年前 | |
[mlir][tosa] Update value to values for ConstOp and ConstShapeOp (#129943) Updated the dialect to match TOSA v1.0 specification for ConstOp and ConstShapeOp (https://www.mlplatform.org/tosa/tosa_spec.html#_const). Also updated lit tests --------- Signed-off-by: Jerry Ge <jerry.ge@arm.com> | 1 年前 | |
[mlir][tosa] Fix scatter duplicate indices check for int64 (#168085) This commit fixes the validation check for duplicate indices in the TOSA scatter operation when using int64 index tensors. Previously, use of int64 index tensors would cause a crash. | 8 个月前 | |
[mlir][tosa] Add support for cast_from/to_block_scaled (#163436) This commit adds support for the cast_from/to_block_scaled operations from the ext-mxfp extension. This includes: - Operation definition in TosaOps.td - Micro-scaling supported types definition - Shape inference and verifiers - Validation pass checks to ensure usage is only valid when the target environment includes ext-mxfp and at least v1.1.draft of the specification. Note: currently it excludes support for mxint8. This will be added in a later commit. Note: this commit adds support as defined in the spec in https://github.com/arm/tosa-specification/commit/063846a75b9687ab01e58cb3538472bffb3a03b0. EXT_MXFP extension is considered experimental and subject to breaking change. Co-authored-by: Tat Wai Chong <tatwai.chong@arm.com> | 9 个月前 | |
[mlir][tosa] Add support for cast_from/to_block_scaled (#163436) This commit adds support for the cast_from/to_block_scaled operations from the ext-mxfp extension. This includes: - Operation definition in TosaOps.td - Micro-scaling supported types definition - Shape inference and verifiers - Validation pass checks to ensure usage is only valid when the target environment includes ext-mxfp and at least v1.1.draft of the specification. Note: currently it excludes support for mxint8. This will be added in a later commit. Note: this commit adds support as defined in the spec in https://github.com/arm/tosa-specification/commit/063846a75b9687ab01e58cb3538472bffb3a03b0. EXT_MXFP extension is considered experimental and subject to breaking change. Co-authored-by: Tat Wai Chong <tatwai.chong@arm.com> | 9 个月前 | |
[mlir][tosa] Allow int64 index tensors in gather/scatter (#167894) This commit ensures that gather and scatter operations with int64 index tensors can be created. This aligns with the EXT_INT64 extension. | 8 个月前 | |
[mlir][tosa] Add the concept of a TOSA target environment (#153771) This commit introduces a new module-level attribute tosa.target_env. It encapsulates target information for use during compilation such as: level, profiles and extensions. For example: mlir module attributes {tosa.target_env = #tosa.target_env<level = none, profiles = [pro_int], extensions = [int16, int4]>} { <my-tosa-program> } Previously the validation pass accepted target information as a series of command line pass options. This commit changes the behaviour to query the attached target environment from the module attribute. This refactoring allows other passes to query the same target information. A new target environment can be attached using the --tosa-attach-target pass, which takes the same command line options as the previous validation pass arguments. For example: bash mlir-opt --tosa-attach-target="profiles=pro_int extensions=int4,int16 level=none" test.mlir | 9 个月前 | |
[mlir][tosa] Add support for cast_from/to_block_scaled (#163436) This commit adds support for the cast_from/to_block_scaled operations from the ext-mxfp extension. This includes: - Operation definition in TosaOps.td - Micro-scaling supported types definition - Shape inference and verifiers - Validation pass checks to ensure usage is only valid when the target environment includes ext-mxfp and at least v1.1.draft of the specification. Note: currently it excludes support for mxint8. This will be added in a later commit. Note: this commit adds support as defined in the spec in https://github.com/arm/tosa-specification/commit/063846a75b9687ab01e58cb3538472bffb3a03b0. EXT_MXFP extension is considered experimental and subject to breaking change. Co-authored-by: Tat Wai Chong <tatwai.chong@arm.com> | 9 个月前 | |
[mlir][tosa] Add the concept of a TOSA target environment (#153771) This commit introduces a new module-level attribute tosa.target_env. It encapsulates target information for use during compilation such as: level, profiles and extensions. For example: mlir module attributes {tosa.target_env = #tosa.target_env<level = none, profiles = [pro_int], extensions = [int16, int4]>} { <my-tosa-program> } Previously the validation pass accepted target information as a series of command line pass options. This commit changes the behaviour to query the attached target environment from the module attribute. This refactoring allows other passes to query the same target information. A new target environment can be attached using the --tosa-attach-target pass, which takes the same command line options as the previous validation pass arguments. For example: bash mlir-opt --tosa-attach-target="profiles=pro_int extensions=int4,int16 level=none" test.mlir | 9 个月前 | |
[mlir][tosa] Switch zero point of negate to input variable type (#129758) This commit changes the zero point attribute to an input to align with the 1.0 spec. Signed-off-by: Tai Ly <tai.ly@arm.com> Co-authored-by: Luke Hutton <luke.hutton@arm.com> | 1 年前 | |
[mlir][tosa] Add specification versioning to target environment (#156425) This commit adds a new "specification_version" field to the TOSA target environment attribute. This allows a user to specify which version of the TOSA specification they would like to target during lowering. A leading example in the validation pass has also been added. This addition adds a version to each profile compliance entry to track which version of the specification the entry was added. This allows a backwards compatibility check to be implemented between the target version and the profile compliance entry version. For now a default version of "1.0" is assumed. "1.1.draft" is added to denote an in-development version of the specification targeting the next release. | 9 个月前 | |
[mlir][tosa] Handle unsigned constants in TosaConvertIntegerTypeToSignless (#156483) This commit fixes handling of unsigned constant data in the TosaConvertIntegerTypeToSignless pass. Previously, the type of the "values" attribute would remain unsigned, which caused an error in the const ops verifier: error: 'tosa.const' op expected same attr/result element types %input_zp = "tosa.const"() {values = dense<17> : tensor<1xui8>} : () -> tensor<1xui8> ^ note: see current operation: %0 = "tosa.const"() <{values = dense<17> : tensor<1xui8>}> : () -> tensor<1xi8> Now the constant data in "values" is transformed to signless as well. | 10 个月前 | |
[tosa] : Relax dynamic dimension checks for batch for conv decompositions (#168764) This PR relaxes the validation checks to allow input/output data to have dynamic batch dimensions. | 8 个月前 | |
[tosa] : Relax dynamic dimension checks for batch for conv decompositions (#168764) This PR relaxes the validation checks to allow input/output data to have dynamic batch dimensions. | 8 个月前 | |
[mlir][tosa] Add support for cast_from/to_block_scaled (#163436) This commit adds support for the cast_from/to_block_scaled operations from the ext-mxfp extension. This includes: - Operation definition in TosaOps.td - Micro-scaling supported types definition - Shape inference and verifiers - Validation pass checks to ensure usage is only valid when the target environment includes ext-mxfp and at least v1.1.draft of the specification. Note: currently it excludes support for mxint8. This will be added in a later commit. Note: this commit adds support as defined in the spec in https://github.com/arm/tosa-specification/commit/063846a75b9687ab01e58cb3538472bffb3a03b0. EXT_MXFP extension is considered experimental and subject to breaking change. Co-authored-by: Tat Wai Chong <tatwai.chong@arm.com> | 9 个月前 | |
[mlir][tosa] Add a pass to narrow i64 to i32 (#165581) This pass aims to narrow i64 types on TOSA operations to i32. It can be useful for legalizations from various frameworks. It comes with the following options: - "aggressive-rewrite" - This option is typically able to narrow more values, but may impact numerical behaviour if not used carefully. - "convert-function-boundaries" - If enabled, parameters/ results to/from a function may be narrowed. Otherwise, casts are inserted to preserve the I/O of the function. Currently the non aggressive mode is very limited, targeting an argmax -> cast sequence that has been observed during legalization as well as some data layout operations that can always narrow. Support for more operations will be added in the future. Co-authored-by: Vitalii Shutov <vitalii.shutov@arm.com> Co-authored-by: Shubham <shubham@arm.com> Co-authored-by: Declan Flavin <declan.flavin@arm.com> Signed-off-by: Luke Hutton <luke.hutton@arm.com> Co-authored-by: Vitalii Shutov <vitalii.shutov@arm.com> Co-authored-by: Shubham <shubham@arm.com> Co-authored-by: Declan Flavin <declan.flavin@arm.com> | 8 个月前 | |
[mlir][tosa] Add a pass to narrow i64 to i32 (#165581) This pass aims to narrow i64 types on TOSA operations to i32. It can be useful for legalizations from various frameworks. It comes with the following options: - "aggressive-rewrite" - This option is typically able to narrow more values, but may impact numerical behaviour if not used carefully. - "convert-function-boundaries" - If enabled, parameters/ results to/from a function may be narrowed. Otherwise, casts are inserted to preserve the I/O of the function. Currently the non aggressive mode is very limited, targeting an argmax -> cast sequence that has been observed during legalization as well as some data layout operations that can always narrow. Support for more operations will be added in the future. Co-authored-by: Vitalii Shutov <vitalii.shutov@arm.com> Co-authored-by: Shubham <shubham@arm.com> Co-authored-by: Declan Flavin <declan.flavin@arm.com> Signed-off-by: Luke Hutton <luke.hutton@arm.com> Co-authored-by: Vitalii Shutov <vitalii.shutov@arm.com> Co-authored-by: Shubham <shubham@arm.com> Co-authored-by: Declan Flavin <declan.flavin@arm.com> | 8 个月前 | |
[mlir][tosa] Remove perms input for tosa.transpose tests (#134740) Perms is now an attribute, not input. Signed-off-by: Jerry Ge <jerry.ge@arm.com> | 1 年前 | |
[mlir][tosa] Add the concept of a TOSA target environment (#153771) This commit introduces a new module-level attribute tosa.target_env. It encapsulates target information for use during compilation such as: level, profiles and extensions. For example: mlir module attributes {tosa.target_env = #tosa.target_env<level = none, profiles = [pro_int], extensions = [int16, int4]>} { <my-tosa-program> } Previously the validation pass accepted target information as a series of command line pass options. This commit changes the behaviour to query the attached target environment from the module attribute. This refactoring allows other passes to query the same target information. A new target environment can be attached using the --tosa-attach-target pass, which takes the same command line options as the previous validation pass arguments. For example: bash mlir-opt --tosa-attach-target="profiles=pro_int extensions=int4,int16 level=none" test.mlir | 9 个月前 | |
[mlir][tosa] Add the concept of a TOSA target environment (#153771) This commit introduces a new module-level attribute tosa.target_env. It encapsulates target information for use during compilation such as: level, profiles and extensions. For example: mlir module attributes {tosa.target_env = #tosa.target_env<level = none, profiles = [pro_int], extensions = [int16, int4]>} { <my-tosa-program> } Previously the validation pass accepted target information as a series of command line pass options. This commit changes the behaviour to query the attached target environment from the module attribute. This refactoring allows other passes to query the same target information. A new target environment can be attached using the --tosa-attach-target pass, which takes the same command line options as the previous validation pass arguments. For example: bash mlir-opt --tosa-attach-target="profiles=pro_int extensions=int4,int16 level=none" test.mlir | 9 个月前 | |
[mlir][tosa] Add specification versioning to target environment (#156425) This commit adds a new "specification_version" field to the TOSA target environment attribute. This allows a user to specify which version of the TOSA specification they would like to target during lowering. A leading example in the validation pass has also been added. This addition adds a version to each profile compliance entry to track which version of the specification the entry was added. This allows a backwards compatibility check to be implemented between the target version and the profile compliance entry version. For now a default version of "1.0" is assumed. "1.1.draft" is added to denote an in-development version of the specification targeting the next release. | 9 个月前 | |
[mlir][tosa] Fix scatter duplicate indices check for int64 (#168085) This commit fixes the validation check for duplicate indices in the TOSA scatter operation when using int64 index tensors. Previously, use of int64 index tensors would cause a crash. | 8 个月前 | |
[mlir][tosa] Change Transpose perms operand to attribute (#128115) This patch changes the perms operand for Tosa Transpose operator to an i32 array attribute Signed-off-by: Tai Ly <tai.ly@arm.com> | 1 年前 | |
[mlir][tosa] Apply 'Symbol' trait to tosa.variable (#153223) Implement SymbolOpInterface on tosa.variable so that it's declaration is automatically inserted into its parents SymbolTable. Verifiers for tosa.variable_read/write can now look up the symbol and guarantee it exists, and duplicate names are caught at creation time. Previously this was completed by walking the graph which could be inefficient. Unfortunately, the Symbol trait expects to find a symbol name via a hard-coded attribute name "sym_name". Therefore, "name" is renamed to"sym_name" and a getName() wrapper is provided for backwards compatibility. This change also restricts tosa.variable declarations to ops that carry a SymbolTable (e.g. modules), rather than allowing them to be placed inside a func.func. Note: EXT-VARIABLE is an experimental extension in the TOSA specification, so is not subject to backwards compatibility guarantees. | 9 个月前 | |
[mlir][tosa] Add support for cast_from/to_block_scaled (#163436) This commit adds support for the cast_from/to_block_scaled operations from the ext-mxfp extension. This includes: - Operation definition in TosaOps.td - Micro-scaling supported types definition - Shape inference and verifiers - Validation pass checks to ensure usage is only valid when the target environment includes ext-mxfp and at least v1.1.draft of the specification. Note: currently it excludes support for mxint8. This will be added in a later commit. Note: this commit adds support as defined in the spec in https://github.com/arm/tosa-specification/commit/063846a75b9687ab01e58cb3538472bffb3a03b0. EXT_MXFP extension is considered experimental and subject to breaking change. Co-authored-by: Tat Wai Chong <tatwai.chong@arm.com> | 9 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 9 个月前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 10 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 9 个月前 |