You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing a strange pattern matching failure, can anyone help me see what the problem is there.
when using this pattern ,can find slice ,but matmul can not found.
def get_plugin_pattern(self):
def check_constant_value(val):
def check(node):
if not hasattr(node, "attrs") or "value" not in node.attrs:
return False
value = node.attrs["value"].values
return value.size == 1 and value == val
return check
pattern=gs.GraphPattern()
input = pattern.variable()
#first matmul add relu layernoemalization branch
starts_b01 = pattern.add("B01_slice_start", "Constant", check_func=check_constant_value(0))
ends_b01 = pattern.add("B01_slice_end", "Constant", check_func=check_constant_value(3))
axes_b01 = pattern.add("B01_slice_axes", "Constant",check_func=check_constant_value(2))
steps_b01 = pattern.add("B01_slice_step", "Constant", check_func=check_constant_value(1))
slice0_b01 = pattern.add("slice0_b01",
op="Slice",
inputs=[input, starts_b01, ends_b01, axes_b01, steps_b01],
num_output_tensors=1)
matmul01_constant_input_b01 = pattern.constant()#128
matmul01_b01=pattern.add("matmul01_b01",op="MatMul",inputs=[slice0_b01,matmul01_constant_input_b01],num_output_tensors=1)
pattern.set_output_tensors([matmul01_b01])
return pattern
The text was updated successfully, but these errors were encountered:
peanutPod
changed the title
onnx-graphsurgeon can not find pattern
onnx-graphsurgeon pattern match failed
Jan 24, 2025
peanutPod
changed the title
onnx-graphsurgeon pattern match failed
I'm having a weird match failure problem when I use onnx-graphsurgeon tools
Jan 24, 2025
starts_b01 = pattern.add("B01_slice_start", "Constant", check_func=check_constant_value(0)) and starts_b01 =pattern.constant()#128 isdifferent ,case the problem
onnxmodel.zip
I'm experiencing a strange pattern matching failure, can anyone help me see what the problem is there.
when using this pattern ,can find slice ,but matmul can not found.
The text was updated successfully, but these errors were encountered: