even faster on pimcomp models
Validate Operations / validate-operations (push) Has been cancelled

This commit is contained in:
NiccoloN
2026-07-31 21:15:28 +02:00
parent 9ca1a0ed9f
commit f4a3b012cc
49 changed files with 1923 additions and 583 deletions
+25
View File
@@ -218,6 +218,30 @@ def conv_huge_pointwise_1024_dynamic():
save_model(model, "conv/huge_pointwise_1024_dynamic", "conv_huge_pointwise_1024_dynamic.onnx")
def conv_yolo11n_stem():
"""First two YOLO11n Conv-SiLU blocks, preserving the distributed intermediate."""
X = helper.make_tensor_value_info("X", TensorProto.FLOAT, [1, 3, 640, 640])
Y = helper.make_tensor_value_info("Y", TensorProto.FLOAT, [1, 32, 160, 160])
rng = np.random.default_rng(109)
W0 = numpy_helper.from_array(rng.uniform(-1, 1, (16, 3, 3, 3)).astype(np.float32), name="W0")
B0 = numpy_helper.from_array(rng.uniform(-1, 1, (16,)).astype(np.float32), name="B0")
W1 = numpy_helper.from_array(rng.uniform(-1, 1, (32, 16, 3, 3)).astype(np.float32), name="W1")
B1 = numpy_helper.from_array(rng.uniform(-1, 1, (32,)).astype(np.float32), name="B1")
nodes = [
helper.make_node("Conv", ["X", "W0", "B0"], ["C0"],
kernel_shape=[3, 3], strides=[2, 2], pads=[1, 1, 1, 1]),
helper.make_node("Sigmoid", ["C0"], ["S0"]),
helper.make_node("Mul", ["C0", "S0"], ["A0"]),
helper.make_node("Conv", ["A0", "W1", "B1"], ["C1"],
kernel_shape=[3, 3], strides=[2, 2], pads=[1, 1, 1, 1]),
helper.make_node("Sigmoid", ["C1"], ["S1"]),
helper.make_node("Mul", ["C1", "S1"], ["Y"]),
]
graph = helper.make_graph(nodes, "conv_yolo11n_stem", [X], [Y], initializer=[W0, B0, W1, B1])
model = helper.make_model(graph, opset_imports=[helper.make_opsetid("", 13)])
save_model(model, "conv/yolo11n_stem", "conv_yolo11n_stem.onnx")
def conv_pointwise_tiled_chain():
"""Chained pointwise Convs with a tiled intermediate."""
X = helper.make_tensor_value_info("X", TensorProto.FLOAT, [1, 1024, 1, 1])
@@ -2032,6 +2056,7 @@ if __name__ == "__main__":
conv_dynamic()
conv_huge_pointwise_1024()
conv_huge_pointwise_1024_dynamic()
conv_yolo11n_stem()
conv_pointwise_tiled_chain()
conv_large_output_channels_1x1()
conv_large_input_channels_1x1()