Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,16 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
# 8. Paths stored in the CMake System Package Registry
# 9. Paths specified by the PATHS option (assumed hard-coded guesses)
set(path_to_cmake_dir ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules)
find_package(IntelSYCL REQUIRED PATHS ${path_to_cmake_dir})
# TODO: use the commented logic once the compiler resolves CMake issue
# find_package(IntelSYCL REQUIRED PATHS ${path_to_cmake_dir})
find_package(IntelSYCL QUIET)
if(SYCL_LIBRARY_FOUND)
find_package(IntelSYCL REQUIRED)
else()
# compiler CMake might have an issue and can't find SYCL_LIBRARY properly
# then use vendored CMake with fixed logic
find_package(IntelSYCL REQUIRED PATHS ${path_to_cmake_dir} NO_DEFAULT_PATH)
endif()
find_package(TBB REQUIRED PATHS ${path_to_cmake_dir})

set(MKL_ARCH "intel64")
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if DEFINED OVERRIDE_INTEL_IPO (
set "CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE"
)

FOR %%V IN (17.0.0 17 18.0.0 18 19.0.0 19 20.0.0 20 21.0.0 21) DO @(
FOR %%V IN (17.0.0 17 18.0.0 18 19.0.0 19 20.0.0 20 21.0.0 21 22.0.0 22) DO @(
REM set DIR_HINT if directory exists
IF EXIST "%BUILD_PREFIX%\Library\lib\clang\%%V\" (
set "SYCL_INCLUDE_DIR_HINT=%BUILD_PREFIX%\Library\lib\clang\%%V"
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set max_compiler_and_mkl_version = environ.get("MAX_BUILD_CMPL_MKL_VERSION", "2026.0a0") %}
{% set max_compiler_and_mkl_version = environ.get("MAX_BUILD_CMPL_MKL_VERSION", "2027.0a0") %}
{% set required_compiler_and_mkl_version = "2025.0" %}
{% set required_dpctl_version = "0.22.0*" %}

Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ if(SYCL_COMPILER)
)
#TODO Make an input file to configure and update the lib current version
if(WIN32)
set(sycl_lib_suffix "8")
set(sycl_lib_suffix "9")
else()
set(sycl_lib_suffix "")
endif()
Expand Down
30 changes: 26 additions & 4 deletions dpnp/tests/third_party/cupy/linalg_tests/test_decomposition.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
from __future__ import annotations

import unittest

import numpy
import pytest

import dpnp as cupy

# from cupyx import cusolver
# from cupy.cuda import driver
# from cupy.cuda import runtime
# from cupy.linalg import _util
from dpnp.tests.helper import (
LTS_VERSION,
has_support_aspect64,
is_cpu_device,
is_lts_driver,
is_win_platform,
)
from dpnp.tests.third_party.cupy import testing
from dpnp.tests.third_party.cupy.testing import _condition

# import cupyx


def random_matrix(shape, dtype, scale, sym=False):
m, n = shape[-2:]
Expand Down Expand Up @@ -95,6 +106,8 @@ def test_decomposition(self, dtype):
]
)
def test_batched_decomposition(self, dtype):
# if not cusolver.check_availability("potrfBatched"):
# pytest.skip("potrfBatched is not available")
Ab1 = random_matrix((3, 5, 5), dtype, scale=(10, 10000), sym=True)
self.check_L(Ab1)
Ab2 = random_matrix((2, 2, 5, 5), dtype, scale=(10, 10000), sym=True)
Expand Down Expand Up @@ -134,9 +147,6 @@ def check_L(self, array):
with pytest.raises(xp.linalg.LinAlgError):
xp.linalg.cholesky(a)

# TODO: remove skipif when MKLD-17318 is resolved
# _potrf does not raise an error with singular matrices on CPU.
@pytest.mark.skipif(is_cpu_device(), reason="MKLD-17318")
@testing.for_dtypes(
[
numpy.int32,
Expand All @@ -163,6 +173,10 @@ class TestQRDecomposition(unittest.TestCase):

@testing.for_dtypes("fdFD")
def check_mode(self, array, mode, dtype):
# if runtime.is_hip and driver.get_build_version() < 307:
# if dtype in (numpy.complex64, numpy.complex128):
# pytest.skip("ungqr unsupported")

a_cpu = numpy.asarray(array, dtype=dtype)
a_gpu = cupy.asarray(array, dtype=dtype)
result_gpu = cupy.linalg.qr(a_gpu, mode=mode)
Expand All @@ -189,13 +203,21 @@ def test_mode(self):
self.check_mode(numpy.random.randn(3, 3), mode=self.mode)
self.check_mode(numpy.random.randn(5, 4), mode=self.mode)

@pytest.mark.skipif(
not is_win_platform() and is_lts_driver(version=LTS_VERSION.V1_6),
reason="SAT-8375",
)
@testing.with_requires("numpy>=1.22")
@testing.fix_random()
def test_mode_rank3(self):
self.check_mode(numpy.random.randn(3, 2, 4), mode=self.mode)
self.check_mode(numpy.random.randn(4, 3, 3), mode=self.mode)
self.check_mode(numpy.random.randn(2, 5, 4), mode=self.mode)

@pytest.mark.skipif(
not is_win_platform() and is_lts_driver(version=LTS_VERSION.V1_6),
reason="SAT-8375",
)
@testing.with_requires("numpy>=1.22")
@testing.fix_random()
def test_mode_rank4(self):
Expand Down
Loading