oneDNN icon indicating copy to clipboard operation
oneDNN copied to clipboard

windows convolution forward bug

Open kobevaliant opened this issue 9 years ago • 1 comments

Description

dnnExecute_F32 uses xmm/ymm registers without restoring them. Then some local variable using these registers will be changed.

Windows Register Usage is some differrent from *nix.

https://msdn.microsoft.com/en-us/library/9z1stfyw.aspx Note "Must be preserved as needed by callee"

Environment

version: mklml_win_2018.0.1.20171007 Windows10 Intel i7-6700k Visual C++ compiler 2015

Steps to reproduce

Watch the register window

Walkaround Solution

#ifdef _WIN32 //handle mkl-dnn bug __declspec(align(16)) unsigned char buf[512]; _fxsave64(buf); #endif

CHECK(dnnExecute_F32(ctx.desc, resources));

#ifdef _WIN32 _fxrstor64(buf); #endif

kobevaliant avatar Nov 11 '17 11:11 kobevaliant

The issue does not affect Intel MKL-DNN, so I will close it on Github. I created an internal defect to track this.

tprimak avatar Nov 13 '17 21:11 tprimak