Skip to content

Commit 042dd81

Browse files
committed
Merge pull request #1202 from fengyuentau:dnn/fix_cuda_matmul_crash
2 parents 9d0d24d + c397223 commit 042dd81

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed
4.13 KB
Binary file not shown.
2.13 KB
Binary file not shown.

testdata/dnn/onnx/generate_onnx_models_with_onnxscript.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,3 +380,13 @@ def clip_div_shared_constant(x: ost.FLOAT[1, 8, 12, 10]) -> ost.FLOAT[1, 8, 12,
380380
clip = op.Clip(div, Constant_output_0, Constant_1_output_0)
381381
return clip
382382
make_model_and_data(clip_div_shared_constant, np.random.rand(1, 8, 12, 10).astype(np.float32))
383+
384+
''' Subgraph [Input] -> MatMul<B> -> [Outpunt]
385+
'''
386+
387+
B = np.random.randn(16, 8).astype(np.float32)
388+
389+
@ost.script()
390+
def matmul_bcast(x: ost.FLOAT[64, 1, 16]) -> ost.FLOAT[64, 1, 8]:
391+
return op.MatMul(x, op.Constant(value=onnx.numpy_helper.from_array(B)))
392+
make_model_and_data(matmul_bcast, np.random.randn(64, 1, 16).astype(np.float32))
704 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)