Skip to content

test_dpcpp_version is made non-failing #755

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 1 commit into from
Jan 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion dpctl/tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import os.path
import re

import pytest

import dpctl


Expand Down Expand Up @@ -67,6 +69,11 @@ def test_get_include():


def test_get_dpcppversion():
"""Intent of this test is to verify that libraries from dpcpp_cpp_rt
conda package used at run-time are not from an older oneAPI. Since these
libraries currently do not report the version, this test was using
a proxy (version of Intel(R) Math Kernel Library).
"""
incl_dir = dpctl.get_include()
libs = glob.glob(os.path.join(incl_dir, "..", "*DPCTLSyclInterface*"))
libs = sorted(libs)
Expand All @@ -80,7 +87,12 @@ def test_get_dpcppversion():
dpcpp_ver = dpcpp_ver.decode("utf-8")
mkl_ver = _get_mkl_version_if_present()
if mkl_ver is not None:
assert mkl_ver >= dpcpp_ver
if not mkl_ver >= dpcpp_ver:
pytest.xfail(
reason="Flaky test: Investigate Math Kernel Library "
f"library version {mkl_ver} being older than "
f"DPC++ version {dpcpp_ver} used to build dpctl"
)


def test___version__():
Expand Down