Upgrade mklml and set march with official option. - #1469
Conversation
1. There's formal way for setting march. 2. Upgrade to new MKLML. Besides, the mem patch can be drop for v1.0.0 since it's fixed in upstream.
|
Seems the patch is very sensitive. |
the mem-patch? we can ask intel for one that is compatible with v0.20.1 |
|
Actually a better way is to upgrade to v1.0. |
yes, that is true, but that is a bigger effort than these minor changes (due to many compatibility breaks in v1.0) |
|
mem-fix patch Performance improvement from 0.21 0.21 1.0 |
|
/azp run |
|
Azure Pipelines successfully started running 22 pipeline(s). |
|
All build passed. |
|
on the surface, it looks okay. i'm just not sure about taking mklml from a different version of mkldnn than the mkldnn version we build against. |
|
It is a minor version update of mkl (in case you don't know mklml is created directly from mkl PIC static lib), and mkl update should be hassle free and always recommended. The benefit is, when it's shared with other component (since it's a shared lib), there will be version inconsistency and in this case the best solution is just to use the latest. Since mkldnn is dropping mkl dependency, I wonder if this is gonna be the last mklml release. |
|
But, does it mean, whenever your product want to upgrade MKL, you'll force onnxruntime do the same thing at the same time? |
@snnn If 2 components uses the same shared lib, and there's no versioning like Also please understand v0.20 is MKLDNN's version, not MKLML's. |
| list(APPEND MKLDNN_CMAKE_EXTRA_ARGS "-DARCH_OPT_FLAGS=\"\"") | ||
| # v1.0 | ||
| list(APPEND MKLDNN_CMAKE_EXTRA_ARGS "-DMKLDNN_ARCH_OPT_FLAGS=\"\"") | ||
| set(MKLDNN_PATCH_COMMAND1 git apply ${CMAKE_SOURCE_DIR}/patches/mkldnn/mem-patch.cmake.patch) |
There was a problem hiding this comment.
just noticed this.
why is the mem-patch only applied if NOT onnxruntime_BUILD_FOR_NATIVE_MACHINE,
looks like an error. I think the patch should always be applied.
lines 68 and 70 should be moved outside the if check.
(I know this isn't introduced by your PR, but since you are touching this file, it's convenient to fix it?)
There was a problem hiding this comment.
No problem.
I thought it's by-design...
There was a problem hiding this comment.
we can fix it separately.

Besides, the mem patch can be drop for v1.0.0 since it's fixed in upstream.