Created
March 27, 2020 19:45
-
-
Save stellaraccident/6dc171286157a9a6bd919bbee4a45cc4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
module { | |
func @simple_mul(%arg0: tensor<?xf32>) -> tensor<?xf32> attributes {iree.module.export} { | |
%0 = "xla_hlo.abs"(%arg0) : (tensor<?xf32>) -> tensor<?xf32> | |
return %0 : tensor<?xf32> | |
} | |
} | |
*** IR Dump After xla_hlo::(anonymous namespace)::LegalizeControlFlow *** | |
func @simple_mul(%arg0: tensor<?xf32>) -> tensor<?xf32> attributes {iree.module.export} { | |
%0 = "xla_hlo.abs"(%arg0) : (tensor<?xf32>) -> tensor<?xf32> | |
return %0 : tensor<?xf32> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::(anonymous namespace)::FlattenTuplesInCFGPass *** | |
module { | |
func @simple_mul(%arg0: tensor<?xf32>) -> tensor<?xf32> attributes {iree.module.export} { | |
%0 = "xla_hlo.abs"(%arg0) : (tensor<?xf32>) -> tensor<?xf32> | |
return %0 : tensor<?xf32> | |
} | |
} | |
*** IR Dump After InlinerPass *** | |
module { | |
func @simple_mul(%arg0: tensor<?xf32>) -> tensor<?xf32> attributes {iree.module.export} { | |
%0 = "xla_hlo.abs"(%arg0) : (tensor<?xf32>) -> tensor<?xf32> | |
return %0 : tensor<?xf32> | |
} | |
} | |
*** IR Dump After Canonicalizer *** | |
func @simple_mul(%arg0: tensor<?xf32>) -> tensor<?xf32> attributes {iree.module.export} { | |
%0 = "xla_hlo.abs"(%arg0) : (tensor<?xf32>) -> tensor<?xf32> | |
return %0 : tensor<?xf32> | |
} | |
*** IR Dump After CSE *** | |
func @simple_mul(%arg0: tensor<?xf32>) -> tensor<?xf32> attributes {iree.module.export} { | |
%0 = "xla_hlo.abs"(%arg0) : (tensor<?xf32>) -> tensor<?xf32> | |
return %0 : tensor<?xf32> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::LegalizeInputTypesPass *** | |
module { | |
func @simple_mul(%arg0: tensor<?xf32>) -> tensor<?xf32> attributes {iree.module.export} { | |
%0 = "xla_hlo.abs"(%arg0) : (tensor<?xf32>) -> tensor<?xf32> | |
return %0 : tensor<?xf32> | |
} | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::MaterializeExportedReflectionPass *** | |
func @simple_mul(%arg0: tensor<?xf32> {iree.reflection = {f_partial = "I7!B4!d-1"}}) -> (tensor<?xf32> {iree.reflection = {f_partial = "R7!B4!d-1"}}) attributes {iree.module.export} { | |
%0 = "xla_hlo.abs"(%arg0) : (tensor<?xf32>) -> tensor<?xf32> | |
return %0 : tensor<?xf32> | |
} | |
*** IR Dump After iree_compiler::Shape::(anonymous namespace)::ExpandFunctionDynamicDimsPass *** | |
func @simple_mul(%arg0: tensor<?xf32> {iree.reflection = {f_partial = "I7!B4!d-1"}}, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32> {iree.reflection = {f_partial = "R7!B4!d-1"}}, !shapex.ranked_shape<[?]>) attributes {iree.module.export} { | |
%0 = shapex.tie_shape %arg0, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%1 = "xla_hlo.abs"(%0) : (tensor<?xf32>) -> tensor<?xf32> | |
%2 = shapex.get_ranked_shape %1 : tensor<?xf32> -> !shapex.ranked_shape<[?]> | |
return %1, %2 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::Shape::(anonymous namespace)::TieDynamicShapesPass *** | |
func @simple_mul(%arg0: tensor<?xf32> {iree.reflection = {f_partial = "I7!B4!d-1"}}, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32> {iree.reflection = {f_partial = "R7!B4!d-1"}}, !shapex.ranked_shape<[?]>) attributes {iree.module.export} { | |
%0 = shapex.tie_shape %arg0, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%1 = "xla_hlo.abs"(%0) : (tensor<?xf32>) -> tensor<?xf32> | |
%2 = shapex.get_ranked_shape %1 : tensor<?xf32> -> !shapex.ranked_shape<[?]> | |
%3 = shapex.tie_shape %1, %2 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = shapex.get_ranked_shape %3 : tensor<?xf32> -> !shapex.ranked_shape<[?]> | |
return %3, %4 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::Shape::(anonymous namespace)::MaterializeShapeCalculationsPass *** | |
func @simple_mul(%arg0: tensor<?xf32> {iree.reflection = {f_partial = "I7!B4!d-1"}}, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32> {iree.reflection = {f_partial = "R7!B4!d-1"}}, !shapex.ranked_shape<[?]>) attributes {iree.module.export} { | |
%0 = shapex.tie_shape %arg0, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%1 = "xla_hlo.abs"(%0) : (tensor<?xf32>) -> tensor<?xf32> | |
%2 = shapex.tie_shape %1, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::MergeExportedReflectionPass *** | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.tie_shape %arg0, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%1 = "xla_hlo.abs"(%0) : (tensor<?xf32>) -> tensor<?xf32> | |
%2 = shapex.tie_shape %1, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::PrePartitioningConversionPass *** | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.tie_shape %arg0, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%1 = "xla_hlo.abs"(%0) : (tensor<?xf32>) -> tensor<?xf32> | |
%2 = shapex.tie_shape %1, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::DispatchabilityAnalysisPass *** | |
module { | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.tie_shape %arg0, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%1 = "xla_hlo.abs"(%0) : (tensor<?xf32>) -> tensor<?xf32> | |
%2 = shapex.tie_shape %1, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
} | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = shapex.tie_shape %arg0, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%2 = "xla_hlo.abs"(%1) : (tensor<?xf32>) -> tensor<?xf32> | |
%3 = shapex.tie_shape %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %3, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::IdentifyDispatchRegionsPass *** | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = flow.dispatch.region[%0 : index](%arg2 = %arg0 : tensor<?xf32>, %arg3 = %arg1 : !shapex.ranked_shape<[?]>) -> tensor<?xf32> { | |
%3 = shapex.tie_shape %arg2, %arg3 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = "xla_hlo.abs"(%3) : (tensor<?xf32>) -> tensor<?xf32> | |
flow.return %4 : tensor<?xf32> | |
} | |
%2 = shapex.tie_shape %1, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After CSE *** | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = flow.dispatch.region[%0 : index](%arg2 = %arg0 : tensor<?xf32>, %arg3 = %arg1 : !shapex.ranked_shape<[?]>) -> tensor<?xf32> { | |
%3 = shapex.tie_shape %arg2, %arg3 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = "xla_hlo.abs"(%3) : (tensor<?xf32>) -> tensor<?xf32> | |
flow.return %4 : tensor<?xf32> | |
} | |
%2 = shapex.tie_shape %1, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::FoldCompatibleDispatchRegionsPass *** | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = flow.dispatch.region[%0 : index](%arg2 = %arg0 : tensor<?xf32>, %arg3 = %arg1 : !shapex.ranked_shape<[?]>) -> tensor<?xf32> { | |
%3 = shapex.tie_shape %arg2, %arg3 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = "xla_hlo.abs"(%3) : (tensor<?xf32>) -> tensor<?xf32> | |
flow.return %4 : tensor<?xf32> | |
} | |
%2 = shapex.tie_shape %1, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::RematerializeDispatchConstantsPass *** | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = flow.dispatch.region[%0 : index](%arg2 = %arg0 : tensor<?xf32>, %arg3 = %arg1 : !shapex.ranked_shape<[?]>) -> tensor<?xf32> { | |
%3 = shapex.tie_shape %arg2, %arg3 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = "xla_hlo.abs"(%3) : (tensor<?xf32>) -> tensor<?xf32> | |
flow.return %4 : tensor<?xf32> | |
} | |
%2 = shapex.tie_shape %1, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::OutlineDispatchRegionsPass *** | |
module { | |
flow.executable @simple_mul_ex_dispatch_0 { | |
flow.dispatch.entry @simple_mul_ex_dispatch_0 | |
module { | |
func @simple_mul_ex_dispatch_0(%arg0: tensor<?xf32>, %arg1: index) -> tensor<?xf32> { | |
%0 = shapex.make_ranked_shape %arg1 : (index) -> !shapex.ranked_shape<[?]> | |
%1 = shapex.tie_shape %arg0, %0 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%2 = "xla_hlo.abs"(%1) : (tensor<?xf32>) -> tensor<?xf32> | |
return %2 : tensor<?xf32> | |
} | |
} | |
} | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%2 = flow.dispatch @simple_mul_ex_dispatch_0::@simple_mul_ex_dispatch_0[%0 : index](%arg0, %1) : (tensor<?xf32>, index) -> tensor<?xf32> | |
%3 = shapex.tie_shape %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %3, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
} | |
*** IR Dump After Canonicalizer *** | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%2 = flow.dispatch @simple_mul_ex_dispatch_0::@simple_mul_ex_dispatch_0[%0 : index](%arg0, %1) : (tensor<?xf32>, index) -> tensor<?xf32> | |
%3 = shapex.tie_shape %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %3, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::PostPartitioningConversionPass *** | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%2 = flow.dispatch @simple_mul_ex_dispatch_0::@simple_mul_ex_dispatch_0[%0 : index](%arg0, %1) : (tensor<?xf32>, index) -> tensor<?xf32> | |
%3 = shapex.tie_shape %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %3, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After iree_compiler::IREE::Flow::FormStreamsPass *** | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%2 = flow.ex.stream.fragment(%arg2 = %0 : index, %arg3 = %arg0 : tensor<?xf32>, %arg4 = %1 : index) -> tensor<?xf32> { | |
%4 = flow.dispatch @simple_mul_ex_dispatch_0::@simple_mul_ex_dispatch_0[%arg2 : index](%arg3, %arg4) : (tensor<?xf32>, index) -> tensor<?xf32> | |
flow.return %4 : tensor<?xf32> | |
} | |
%3 = shapex.tie_shape %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %3, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
*** IR Dump After Canonicalizer *** | |
module { | |
flow.executable @simple_mul_ex_dispatch_0 { | |
flow.dispatch.entry @simple_mul_ex_dispatch_0 | |
module { | |
func @simple_mul_ex_dispatch_0(%arg0: tensor<?xf32>, %arg1: index) -> tensor<?xf32> { | |
%0 = shapex.make_ranked_shape %arg1 : (index) -> !shapex.ranked_shape<[?]> | |
%1 = shapex.tie_shape %arg0, %0 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%2 = "xla_hlo.abs"(%1) : (tensor<?xf32>) -> tensor<?xf32> | |
return %2 : tensor<?xf32> | |
} | |
} | |
} | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%2 = flow.ex.stream.fragment(%arg2 = %0 : index, %arg3 = %arg0 : tensor<?xf32>, %arg4 = %1 : index) -> tensor<?xf32> { | |
%4 = flow.dispatch @simple_mul_ex_dispatch_0::@simple_mul_ex_dispatch_0[%arg2 : index](%arg3, %arg4) : (tensor<?xf32>, index) -> tensor<?xf32> | |
flow.return %4 : tensor<?xf32> | |
} | |
%3 = shapex.tie_shape %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %3, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
} | |
*** IR Dump After iree_compiler::IREE::HAL::MaterializeInterfacesPass *** | |
module { | |
hal.executable @simple_mul_ex_dispatch_0 attributes {sym_visibility = "private"} { | |
hal.interface @legacy_io attributes {push_constants = 1 : i32} { | |
hal.interface.binding @arg0, set=0, binding=0, type="StorageBuffer", access="Read" | |
hal.interface.binding @ret0, set=0, binding=1, type="StorageBuffer", access="Write|Discard" | |
} | |
hal.executable.entry_point @simple_mul_ex_dispatch_0 attributes {interface = @legacy_io, ordinal = 0 : i32, signature = (tensor<?xf32>, index) -> tensor<?xf32>, workgroup_size = [1 : index, 1 : index, 1 : index]} | |
hal.executable.source { | |
module { | |
flow.executable @simple_mul_ex_dispatch_0 { | |
flow.dispatch.entry @simple_mul_ex_dispatch_0 | |
module { | |
func @simple_mul_ex_dispatch_0() { | |
%c0 = constant 0 : index | |
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<?xf32> | |
%1 = hal.interface.load.constant offset = 0 : index | |
%2 = call @simple_mul_ex_dispatch_0_impl(%0, %1) : (tensor<?xf32>, index) -> tensor<?xf32> | |
hal.interface.store.tensor %2, @legacy_io::@ret0, offset = %c0 : tensor<?xf32> | |
return | |
} | |
func @simple_mul_ex_dispatch_0_impl(%arg0: tensor<?xf32>, %arg1: index) -> tensor<?xf32> attributes {sym_visibility = "private"} { | |
%0 = shapex.make_ranked_shape %arg1 : (index) -> !shapex.ranked_shape<[?]> | |
%1 = shapex.tie_shape %arg0, %0 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%2 = "xla_hlo.abs"(%1) : (tensor<?xf32>) -> tensor<?xf32> | |
return %2 : tensor<?xf32> | |
} | |
hal.interface @legacy_io attributes {push_constants = 1 : i32, sym_visibility = "private"} { | |
hal.interface.binding @arg0, set=0, binding=0, type="StorageBuffer", access="Read" | |
hal.interface.binding @ret0, set=0, binding=1, type="StorageBuffer", access="Write|Discard" | |
} | |
} | |
} | |
} | |
} | |
} | |
func @simple_mul(%arg0: tensor<?xf32>, %arg1: !shapex.ranked_shape<[?]>) -> (tensor<?xf32>, !shapex.ranked_shape<[?]>) attributes {iree.module.export, iree.reflection = {f = "I7!B4!d-1R7!B4!d-1", fv = "1"}} { | |
%0 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%1 = shapex.ranked_dim %arg1[0] : !shapex.ranked_shape<[?]> -> index | |
%2 = flow.ex.stream.fragment(%arg2 = %0 : index, %arg3 = %arg0 : tensor<?xf32>, %arg4 = %1 : index) -> tensor<?xf32> { | |
%4 = flow.dispatch @simple_mul_ex_dispatch_0::@simple_mul_ex_dispatch_0[%arg2 : index](%arg3, %arg4) : (tensor<?xf32>, index) -> tensor<?xf32> | |
flow.return %4 : tensor<?xf32> | |
} | |
%3 = shapex.tie_shape %2, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
return %3, %arg1 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
} | |
} | |
*** IR Dump After Canonicalizer *** | |
module { | |
func @simple_mul_ex_dispatch_0() attributes {iree.module.export} { | |
%c0 = constant 0 : index | |
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<?xf32> | |
%1 = hal.interface.load.constant offset = 0 : index | |
%2 = call @simple_mul_ex_dispatch_0_impl(%0, %1) : (tensor<?xf32>, index) -> tensor<?xf32> | |
hal.interface.store.tensor %2, @legacy_io::@ret0, offset = %c0 : tensor<?xf32> | |
return | |
} | |
func @simple_mul_ex_dispatch_0_impl(%arg0: tensor<?xf32>, %arg1: index) -> tensor<?xf32> attributes {sym_visibility = "private"} { | |
%0 = shapex.make_ranked_shape %arg1 : (index) -> !shapex.ranked_shape<[?]> | |
%1 = shapex.tie_shape %arg0, %0 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%2 = "xla_hlo.abs"(%1) : (tensor<?xf32>) -> tensor<?xf32> | |
return %2 : tensor<?xf32> | |
} | |
hal.interface @legacy_io attributes {push_constants = 1 : i32, sym_visibility = "private"} { | |
hal.interface.binding @arg0, set=0, binding=0, type="StorageBuffer", access="Read" | |
hal.interface.binding @ret0, set=0, binding=1, type="StorageBuffer", access="Write|Discard" | |
} | |
} | |
*** IR Dump After xla_hlo::(anonymous namespace)::LegalizeControlFlow *** | |
func @simple_mul_ex_dispatch_0() attributes {iree.module.export} { | |
%c0 = constant 0 : index | |
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<?xf32> | |
%1 = hal.interface.load.constant offset = 0 : index | |
%2 = call @simple_mul_ex_dispatch_0_impl(%0, %1) : (tensor<?xf32>, index) -> tensor<?xf32> | |
hal.interface.store.tensor %2, @legacy_io::@ret0, offset = %c0 : tensor<?xf32> | |
return | |
} | |
*** IR Dump After xla_hlo::(anonymous namespace)::LegalizeControlFlow *** | |
func @simple_mul_ex_dispatch_0_impl(%arg0: tensor<?xf32>, %arg1: index) -> tensor<?xf32> attributes {sym_visibility = "private"} { | |
%0 = shapex.make_ranked_shape %arg1 : (index) -> !shapex.ranked_shape<[?]> | |
%1 = shapex.tie_shape %arg0, %0 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%2 = "xla_hlo.abs"(%1) : (tensor<?xf32>) -> tensor<?xf32> | |
return %2 : tensor<?xf32> | |
} | |
*** IR Dump After InlinerPass *** | |
module { | |
func @simple_mul_ex_dispatch_0() attributes {iree.module.export} { | |
%c0 = constant 0 : index | |
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<?xf32> | |
%1 = hal.interface.load.constant offset = 0 : index | |
%2 = shapex.make_ranked_shape %1 : (index) -> !shapex.ranked_shape<[?]> | |
%3 = shapex.tie_shape %0, %2 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = "xla_hlo.abs"(%3) : (tensor<?xf32>) -> tensor<?xf32> | |
hal.interface.store.tensor %4, @legacy_io::@ret0, offset = %c0 : tensor<?xf32> | |
return | |
} | |
hal.interface @legacy_io attributes {push_constants = 1 : i32, sym_visibility = "private"} { | |
hal.interface.binding @arg0, set=0, binding=0, type="StorageBuffer", access="Read" | |
hal.interface.binding @ret0, set=0, binding=1, type="StorageBuffer", access="Write|Discard" | |
} | |
} | |
*** IR Dump After SymbolDCE *** | |
module { | |
func @simple_mul_ex_dispatch_0() attributes {iree.module.export} { | |
%c0 = constant 0 : index | |
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<?xf32> | |
%1 = hal.interface.load.constant offset = 0 : index | |
%2 = shapex.make_ranked_shape %1 : (index) -> !shapex.ranked_shape<[?]> | |
%3 = shapex.tie_shape %0, %2 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = "xla_hlo.abs"(%3) : (tensor<?xf32>) -> tensor<?xf32> | |
hal.interface.store.tensor %4, @legacy_io::@ret0, offset = %c0 : tensor<?xf32> | |
return | |
} | |
hal.interface @legacy_io attributes {push_constants = 1 : i32, sym_visibility = "private"} { | |
hal.interface.binding @arg0, set=0, binding=0, type="StorageBuffer", access="Read" | |
hal.interface.binding @ret0, set=0, binding=1, type="StorageBuffer", access="Write|Discard" | |
} | |
} | |
*** IR Dump After Canonicalizer *** | |
func @simple_mul_ex_dispatch_0() attributes {iree.module.export} { | |
%c0 = constant 0 : index | |
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<?xf32> | |
%1 = hal.interface.load.constant offset = 0 : index | |
%2 = shapex.make_ranked_shape %1 : (index) -> !shapex.ranked_shape<[?]> | |
%3 = shapex.tie_shape %0, %2 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = "xla_hlo.abs"(%3) : (tensor<?xf32>) -> tensor<?xf32> | |
hal.interface.store.tensor %4, @legacy_io::@ret0, offset = %c0 : tensor<?xf32> | |
return | |
} | |
*** IR Dump After CSE *** | |
func @simple_mul_ex_dispatch_0() attributes {iree.module.export} { | |
%c0 = constant 0 : index | |
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<?xf32> | |
%1 = hal.interface.load.constant offset = 0 : index | |
%2 = shapex.make_ranked_shape %1 : (index) -> !shapex.ranked_shape<[?]> | |
%3 = shapex.tie_shape %0, %2 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = "xla_hlo.abs"(%3) : (tensor<?xf32>) -> tensor<?xf32> | |
hal.interface.store.tensor %4, @legacy_io::@ret0, offset = %c0 : tensor<?xf32> | |
return | |
} | |
*** IR Dump After iree_compiler::IREE::VMLA::UnrollReductionsPass *** | |
func @simple_mul_ex_dispatch_0() attributes {iree.module.export} { | |
%c0 = constant 0 : index | |
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<?xf32> | |
%1 = hal.interface.load.constant offset = 0 : index | |
%2 = shapex.make_ranked_shape %1 : (index) -> !shapex.ranked_shape<[?]> | |
%3 = shapex.tie_shape %0, %2 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = "xla_hlo.abs"(%3) : (tensor<?xf32>) -> tensor<?xf32> | |
hal.interface.store.tensor %4, @legacy_io::@ret0, offset = %c0 : tensor<?xf32> | |
return | |
} | |
*** IR Dump After CSE *** | |
func @simple_mul_ex_dispatch_0() attributes {iree.module.export} { | |
%c0 = constant 0 : index | |
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<?xf32> | |
%1 = hal.interface.load.constant offset = 0 : index | |
%2 = shapex.make_ranked_shape %1 : (index) -> !shapex.ranked_shape<[?]> | |
%3 = shapex.tie_shape %0, %2 : tensor<?xf32>, !shapex.ranked_shape<[?]> | |
%4 = "xla_hlo.abs"(%3) : (tensor<?xf32>) -> tensor<?xf32> | |
hal.interface.store.tensor %4, @legacy_io::@ret0, offset = %c0 : tensor<?xf32> | |
return | |
} | |
WARNING: Logging before InitGoogle() is written to STDERR | |
F0327 12:44:39.125319 180545 logging.cc:107] assert.h assertion failed at third_party/llvm/llvm-project/mlir/include/mlir/IR/Value.h:81 in bool mlir::Value::isa() const [U = mlir::BlockArgument]: *this && "isa<> used on a null type." | |
*** Check failure stack trace: *** | |
@ 0x55a2c16a019c absl::logging_internal::LogMessage::DieIfFatal() | |
@ 0x55a2c169fa63 absl::logging_internal::LogMessage::SendToLog() | |
@ 0x55a2c169ed0e absl::logging_internal::LogMessage::Flush() | |
@ 0x55a2c16a1038 absl::logging_internal::LogMessageFatal::~LogMessageFatal() | |
@ 0x55a2c169cb00 __assert_fail | |
@ 0x55a2bc7b2dcd mlir::Value::isa<>() | |
@ 0x55a2bc9ab1ac mlir::Value::dyn_cast<>() | |
@ 0x55a2bd69b88c mlir::Value::getUseList() | |
@ 0x55a2bd69be55 mlir::OpOperand::getUseList() | |
@ 0x55a2bd33b2c9 mlir::IROperand<>::insertIntoCurrent() | |
@ 0x55a2bd66fe2f mlir::IROperand<>::IROperand() | |
@ 0x55a2bd66f318 _ZN4mlir9OpOperandCI2NS_9IROperandIS0_NS_6detail11OpaqueValueEEEEPNS_9OperationES3_ | |
@ 0x55a2bd6696b7 mlir::Operation::create() | |
@ 0x55a2bd6699ae mlir::Operation::create() | |
@ 0x55a2bd669894 mlir::Operation::create() | |
@ 0x55a2bc38d2c0 mlir::OpBuilder::createOrFold<>() | |
@ 0x55a2bc38b9ba mlir::OpBuilder::createOrFold<>() | |
@ 0x55a2bc389ea5 mlir::iree_compiler::VMLAConversionTarget::allocateOutputBuffer() | |
@ 0x55a2bc3896fe mlir::iree_compiler::VMLAConversionTarget::applyDefaultBufferRewrite() | |
@ 0x55a2bc35d7cc mlir::iree_compiler::VMLAOpConversion<>::matchAndRewrite() | |
@ 0x55a2bc35d6c7 mlir::OpConversionPattern<>::matchAndRewrite() | |
@ 0x55a2bd2c0f09 mlir::ConversionPattern::matchAndRewrite() | |
@ 0x55a2bd2c878f (anonymous namespace)::OperationLegalizer::legalizePattern() | |
@ 0x55a2bd2c7b0d (anonymous namespace)::OperationLegalizer::legalize() | |
@ 0x55a2bd2c7292 (anonymous namespace)::OperationConverter::convert() | |
@ 0x55a2bd2c2796 (anonymous namespace)::OperationConverter::convertOperations() | |
@ 0x55a2bd2c24a4 mlir::applyPartialConversion() | |
@ 0x55a2bd2c28e2 mlir::applyPartialConversion() | |
@ 0x55a2bc32583e mlir::iree_compiler::IREE::VMLA::ConversionPass::runOnOperation() | |
@ 0x55a2bd41f7f0 mlir::Pass::run() | |
@ 0x55a2bd4204c9 mlir::OpPassManager::run() | |
@ 0x55a2bd421bdf mlir::PassManager::run() | |
Fatal Python error: Aborted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment