oneDNN icon indicating copy to clipboard operation
oneDNN copied to clipboard

Generic build on x86

Open diaena opened this issue 5 years ago • 4 comments

Hello, I am trying to get a generic build of oneDNN on x86 (reference only, no JIT implementations), for performance exploration purposes. The problem is I am getting linking errors and I want to make sure I'm not missing anything.

I am building with DNNL_TARGET_ARCH=GENERIC and this leads to linking errors when compiling the tests and the examples. Of course I can add DNNL_BUILD_EXAMPLES=0 and DNNL_BUILD_TESTS=0 and then the build completes successfully but then I don't have benchdnn or any tests and examples to run.

I've also tried setting DNNL_MAX_CPU_ISA=OFF but that doesn't seem to help my case.

I want want to summon my colleague @cfrod who is looking at Tensorflow + oneDNN-reference and seeing similar linking errors.

diaena avatar Jan 22 '21 12:01 diaena

Hi @diaena , I am able to reproduce the issue and I am investigating it. Will come back to you as I rootcause the issue.

mgouicem avatar Jan 22 '21 17:01 mgouicem

So I found the issue. The proper option to DNNL_TARGET_ARCH for generic architecture is not GENERIC but ARCH_GENERIC. Hope this helps :-)

mgouicem avatar Jan 22 '21 17:01 mgouicem

Hi @mgouicem, thanks for the solution. I can confirm that I have tested this and it works for me now.

cfRod avatar Jan 25 '21 13:01 cfRod

Thanks @mgouicem! Maybe it's worth changing from ARCH_GENERIC to GENERIC so it's consistent with the other TARGET_ARCHITECTURES or at least updating the documentation.

diaena avatar Jan 25 '21 15:01 diaena