Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Computation fails with oneDNN error #21199

Open
matteosal opened this issue May 11, 2023 · 0 comments
Open

Computation fails with oneDNN error #21199

matteosal opened this issue May 11, 2023 · 0 comments

Comments

@matteosal
Copy link
Contributor

import mxnet as mx

json = "{\"nodes\":[{\"op\":\"null\",\"name\":\".Inputs.Input\",\"inputs\":[]\
},{\"op\":\"Reshape\",\"name\":\".Nodes.1$0\",\"attrs\":{\"shape\":\"(\
-3, -2)\"},\"inputs\":[[0,0,0]]},{\"op\":\"null\",\"name\":\".Nodes.1.\
Parameters.Net.Arrays.Weights\",\"inputs\":[]},{\"op\":\"null\",\"\
name\":\".Nodes.1.Parameters.Net.Arrays.Biases\",\"inputs\":[]},{\"op\
\":\"Convolution\",\"name\":\".Nodes.1.Parameters.Net\",\"attrs\":{\"\
cudnn_off\":\"0\",\"dilate\":\"(1, 1)\",\"kernel\":\"(1, \
1)\",\"layout\":\"None\",\"no_bias\":\"False\",\"num_filter\":\"200\",\
\"num_group\":\"1\",\"pad\":\"(0, 0)\",\"stride\":\"(1, \
1)\"},\"inputs\":[[1,0,0],[2,0,0],[3,0,0]]},{\"op\":\"reshape_like\",\
\"name\":\".Nodes.1$1\",\"attrs\":{\"lhs_begin\":\"0\",\"lhs_end\":\"\
1\",\"rhs_begin\":\"0\",\"rhs_end\":\"2\"},\"inputs\":[[4,0,0],[0,0,0]\
]},{\"op\":\"Reshape\",\"name\":\".Nodes.2$0\",\"attrs\":{\"shape\":\"\
(0, 2, 200)\"},\"inputs\":[[5,0,0]]},{\"op\":\"_copy\",\"name\":\".\
Outputs.Output\",\"inputs\":[[6,0,0]]}],\"arg_nodes\":[0,2,3],\"heads\
\":[[7,0,0]]}"

sym = mx.symbol.fromjson(json)
op = mx.ndarray.CachedOp(sym)

args = [
	# .Inputs.Input
	mx.np.random.uniform(size=[1, 2, 200, 1, 1], ctx=mx.cpu()),
	# .Nodes.1.Parameters.Net.Arrays.Weights
	mx.np.random.uniform(size=[200, 200, 1, 1], ctx=mx.cpu()),
	# .Nodes.1.Parameters.Net.Arrays.Biases
	mx.np.random.uniform(size=[200], ctx=mx.cpu())	
]

output = op(*args)
print(output)

The above script fails with the following error:

mxnet.base.MXNetError: MXNetError: could not create a primitive descriptor for a reorder primitive

The error appears to be generated from dnnl.hpp. There is a single convolution operator in this symbol which has 200 input channels and 200 output channels. Lowering either of those to 199 does not trigger the error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant