Skip to content

[SYCL] Disable imf libdevice for NV and AMD backend. #19190

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

Open
wants to merge 3 commits into
base: sycl
Choose a base branch
from

Conversation

jinge90
Copy link
Contributor

@jinge90 jinge90 commented Jun 27, 2025

imf libdevice shouldn't be used by NV and AMD backend, this PR stops building it for these 2 backends.
We also move all imf e2e test cases in a separate directory following exp tests.

imf libdevice shouldn't be used by NV and AMD backend,
this PR stops building it for these 2 backends.
We also move all imf e2e test cases in a separate directory
following exp tests.

Signed-off-by: jinge90 <ge.jin@intel.com>
@jinge90 jinge90 requested a review from a team as a code owner June 27, 2025 05:47
@jinge90 jinge90 requested review from sergey-semenov and npmiller and removed request for sergey-semenov June 27, 2025 05:47
@jinge90 jinge90 temporarily deployed to WindowsCILock June 27, 2025 05:47 — with GitHub Actions Inactive
@jinge90
Copy link
Contributor Author

jinge90 commented Jun 27, 2025

Hi, @npmiller
Could you take a look at this PR?
Thanks very much.

@bader
Copy link
Contributor

bader commented Jun 27, 2025

@jinge90, I just merged #19000, which disables e2e tests. Please, update your PR.

Signed-off-by: jinge90 <ge.jin@intel.com>
Signed-off-by: jinge90 <ge.jin@intel.com>
@jinge90 jinge90 temporarily deployed to WindowsCILock June 27, 2025 06:35 — with GitHub Actions Inactive
@jinge90
Copy link
Contributor Author

jinge90 commented Jun 27, 2025

@jinge90, I just merged #19000, which disables e2e tests. Please, update your PR.

Done.
Thanks very much.

Copy link
Contributor

@npmiller npmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks for cleaning that up!

Comment on lines -654 to -656
# Add device fallback imf libraries for the NVPTX and AMD targets.
# The output files are bitcode.
foreach(arch IN LISTS devicelib_arch)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we be explicit and instead do something like:

set(imf_skip_archs "nvptx64-nvidia-cuda" "amdgcn-amd-amdhsa")

add_devicelibs(
# ...
SKIP_ARCHS ${imf_skip_archs}
)

# ...
foreach(arch IN LISTS devicelib_arch)
  if (arch IN_LIST imf_skip_archs)
    continue()
  foreach(dtype IN ITEMS bf16 fp32 fp64)

This would allow future targets that do want to use imf to just work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is imf library target agnostic? If not, I suggest making it opt out by default and list the supported targets explicitly.

Copy link
Contributor Author

@jinge90 jinge90 Jun 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @bader
The imf functions in intel/llvm repo is only a small part of all APIs and this part should be target-agnostic, the other parts from numeric team are close sourced, numeric team designed, verified and tuned only for Intel device, I am afraid these functions are not guaranteed to work correctly on NV and AMD device.
Thanks very much.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I thought, that "Intel Math Functions" were designed only "for Intel devices".
Therefore, there is no sense in building the library for any devices except Intel.
@jinge90, please, change the logic of the build script.

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

Successfully merging this pull request may close these issues.

4 participants