Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed when use shared MKL library #138994

Closed
xuhancn opened this issue Oct 26, 2024 · 1 comment
Closed

Build failed when use shared MKL library #138994

xuhancn opened this issue Oct 26, 2024 · 1 comment
Assignees
Labels
module: mkl Related to our MKL support module: windows Windows support for PyTorch triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@xuhancn
Copy link
Collaborator

xuhancn commented Oct 26, 2024

          Which version of oneAPI are you using to build pytorch? I am using oneAPI binaries from https://www.intel.com/content/www/us/en/developer/articles/tool/pytorch-prerequisites-for-intel-gpu/2-5.html and I am getting linking errors:
   Creating library lib\torch_cpu.lib and object lib\torch_cpu.exp
MklAllocationHelper.cpp.obj : error LNK2019: unresolved external symbol i_malloc referenced in function "void __cdecl `dynamic initializer for 'g_b_registered_mkl_alloction''(void)" (??__Eg_b_registered_mkl_alloction@@YAXXZ)
MklAllocationHelper.cpp.obj : error LNK2019: unresolved external symbol i_calloc referenced in function "void __cdecl `dynamic initializer for 'g_b_registered_mkl_alloction''(void)" (??__Eg_b_registered_mkl_alloction@@YAXXZ)
MklAllocationHelper.cpp.obj : error LNK2019: unresolved external symbol i_realloc referenced in function "void __cdecl `dynamic initializer for 'g_b_registered_mkl_alloction''(void)" (??__Eg_b_registered_mkl_alloction@@YAXXZ)
MklAllocationHelper.cpp.obj : error LNK2019: unresolved external symbol i_free referenced in function "void __cdecl `dynamic initializer for 'g_b_registered_mkl_alloction''(void)" (??__Eg_b_registered_mkl_alloction@@YAXXZ)
bin\torch_cpu.dll : fatal error LNK1120: 4 unresolved externals

Looking at CMakeFiles/torch_cpu.rsp I see that mkl_core_dll.lib is used for linking and it doesn't define these i_* symbols.

Originally posted by @gshimansky in #138419 (comment)

cc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @gujinghui @EikanWang @fengyuan14 @guangyey

@xuhancn xuhancn self-assigned this Oct 26, 2024
@xuhancn xuhancn added module: mkl Related to our MKL support module: windows Windows support for PyTorch module: xpu Intel XPU related issues labels Oct 26, 2024
@ezyang ezyang added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Oct 29, 2024
@EikanWang
Copy link
Collaborator

@xuhancn , could you help refine the title of this issue? As we synced offline, it should not be related xpu.

@EikanWang EikanWang removed the module: xpu Intel XPU related issues label Oct 29, 2024
@xuhancn xuhancn changed the title Which version of oneAPI are you using to build pytorch? I am using oneAPI binaries from https://www.intel.com/content/www/us/en/developer/articles/tool/pytorch-prerequisites-for-intel-gpu/2-5.html and I am getting linking errors: Build failed when use shared MKL library Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: mkl Related to our MKL support module: windows Windows support for PyTorch triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants