8000 Use appropriate MKL getrs_batch_strided API based on MKL Versions by 9prady9 · Pull Request #3181 · arrayfire/arrayfire · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use appropriate MKL getrs_batch_strided API based on MKL Versions #3181

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

Merged
merged 2 commits into from
Oct 14, 2021

Conversation

9prady9
Copy link
Member
@9prady9 9prady9 commented Oct 13, 2021

Description

Fixes #3180 compilation issue on some distros/gcc combination for CPU and OpenCL backend.

Changes to Users

None

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [ ] Functions added to unified API
  • [ ] Functions documented

@9prady9 9prady9 added this to the 3.8.1 milestone Oct 13, 2021
@9prady9 9prady9 force-pushed the fix_solve_batch_upstream_signature branch from 97611cf to 694b77e Compare October 13, 2021 10:44
@9prady9 9prady9 changed the title Add missing const qualifier for MKL API signatures Use appropriate MKL getrs_batch_strided API based on MKL Versions Oct 13, 2021
@9prady9 9prady9 force-pushed the fix_solve_batch_upstream_signature branch from 694b77e to 81e9a55 Compare October 13, 2021 10:47
@9prady9 9prady9 force-pushed the fix_solve_batch_upstream_signature branch from 917f188 to a3992f9 Compare October 13, 2021 12:55
@9prady9 9prady9 merged commit 1ff07ca into arrayfire:master Oct 14, 2021
@9prady9 9prady9 deleted the fix_solve_batch_upstream_signature branch October 14, 2021 05:43
@useongkim
Copy link

Hi,

I am trying to use Arrayfire(v3.8.1) in my project.

I am using MKL version 20220000 and I have exactly the same issue described in #3180.

Does this commit really fix the building issue?

The compile works fine if I comments out the version contional at the header inclusion part.

#if INTEL_MKL_VERSION >= 20210004. (here)
#include <mkl_version.h>
#endif (and here)

The header mkl_version.h is the file that defines the macro INTEL_MKL_VERSION. Since the macro is used before the header inclusion, when the conditional is evaluated, INTEL_MKL_VERSION will be 0 (undefined). So, the header will never be included. This means the successing conditionals will be all false, the not-const type for the pointer is still used, and the compile error occurs.

So I think the version checking conditional for the header inclusion should be deleted.

Thank you.

Useong Kim

@9prady9
Copy link
Member Author
9prady9 commented Feb 18, 2022

Unfortunately, this fix is broken. There has been another fix recently which actually takes care of this. It will be available in next release.

@useongkim
Copy link

Thanks.

I can see the solution in the master branch.

@WilliamTambellini
Copy link
Contributor

@9prady9 @umar456 The 3.8 branch does nt seem to be compat with recent MKL (2021.4 and later) because of these changes of API. Any way to cherry pick that fix into the 3.8 branch ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Build] Build with Intel MKL fails with "invalid conversion" in solve.cpp
4 participants
0