Skip to content

Commit a7245d6

Browse files
committed
fix dnnl runtime
1 parent 3b1c52a commit a7245d6

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

python/tvm/relay/frontend/keras.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@ def _convert_convolution3d(inexpr, keras_layer, etab, data_layout, input_shape=N
456456
if input_shape is None:
457457
input_shape = keras_layer.input_shape
458458

459+
print (data_layout)
460+
459461
if data_layout == "NDHWC":
460462
kernel_layout = "DHWIO"
461463
if is_deconv:

src/runtime/contrib/dnnl/dnnl_json_runtime.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -424,15 +424,10 @@ class DNNLJSONRuntime : public JSONRuntimeBase {
424424
// Minus one for DNNL representation. No dilation for DNNL is 0, for relay is 1.
425425
for (auto& d : dilates) d--;
426426

427-
// TODO(@apeskov): WA. conv3dTranspose uses wrong layout specifier. IO instead of OI.
428-
auto wgh_logic_layout = TensorRequisite::DefaultLogicLayoutFor(wgh_layout);
429-
if (wgh_logic_layout == "OIDHW") wgh_logic_layout = "IODHW";
430-
if (wgh_logic_layout == "GOIDHW") wgh_logic_layout = "GIODHW";
431-
432427
// Take into account provided layout strings
433428
src_tr = src_tr.TreatAs(src_layout);
434429
dst_tr = dst_tr.TreatAs(dst_layout);
435-
wgh_tr = wgh_tr.TreatAs(wgh_layout, wgh_logic_layout);
430+
wgh_tr = wgh_tr.TreatAs(wgh_layout);
436431

437432
// Should support G mixed with O. Like { G*O, I, H, W }
438433
if (wgh_layout.find("G") == std::string::npos) {

0 commit comments

Comments
 (0)