Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
LocalPreferences.toml
Manifest.toml
deps/onemkl_blas.cpp
deps/onemkl_blas.h
deps/onemkl_lapack.cpp
deps/onemkl_lapack.h
deps/onemkl_sparse.cpp
deps/onemkl_sparse.h
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ GPUCompiler = "1.5"
GPUToolbox = "0.1, 0.2, 0.3"
KernelAbstractions = "0.9.1"
LLVM = "6, 7, 8, 9"
NEO_jll = "=24.26.30049"
NEO_jll = "=25.27.34303"
Preferences = "1"
SPIRVIntrinsics = "0.2"
SPIRV_LLVM_Translator_jll = "20"
SpecialFunctions = "1.3, 2"
StaticArrays = "1"
julia = "1.10"
oneAPI_Level_Zero_Loader_jll = "1.9"
oneAPI_Level_Zero_Loader_jll = "1.22"
oneAPI_Support_jll = "0.8"

[extras]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,4 @@ The discovered paths will be written to a global file with preferences, typicall
`$HOME/.julia/environments/vX.Y/LocalPreferences.toml` (where `vX.Y` refers to the Julia
version you are using). You can modify this file, or remove it when you want to revert to
default set of binaries.

2 changes: 1 addition & 1 deletion deps/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ oneAPI_Level_Zero_Headers_jll = "f4bc562b-d309-54f8-9efb-476e56f0410d"
oneAPI_Support_Headers_jll = "24f86df5-245d-5634-a4cc-32433d9800b3"

[compat]
oneAPI_Support_Headers_jll = "=2025.1.0"
oneAPI_Support_Headers_jll = "=2025.2.0"
2 changes: 1 addition & 1 deletion deps/build_local.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if !isfile(joinpath(conda_dir, "condarc-julia.yml"))
touch(joinpath(conda_dir, "conda-meta", "history"))
end
Conda.add_channel("https://software.repos.intel.com/python/conda/", conda_dir)
Conda.add(["dpcpp_linux-64=2025.1.0", "mkl-devel-dpcpp=2025.1.0"], conda_dir)
Conda.add(["dpcpp_linux-64=2025.2.0", "mkl-devel-dpcpp=2025.2.0"], conda_dir)

Conda.list(conda_dir)

Expand Down
2 changes: 1 addition & 1 deletion deps/generate_helpers.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
non_parametric_routines = ["init_matrix_handle", "release_matrix_handle", "set_matrix_property",
"init_matmat_descr", "release_matmat_descr", "set_matmat_data", "get_matmat_data", "matmat",
"omatcopy", "sort_matrix", "optimize_gemv", "optimize_trmv", "optimize_trsv", "optimize_trsm",
"omatcopy", "sort_matrix", "optimize_gemv", "optimize_gemm", "optimize_trmv", "optimize_trsv", "optimize_trsm",
"init_omatconvert_descr", "release_omatconvert_descr", "init_omatadd_descr", "release_omatadd_descr",
"omatconvert_buffer_size", "omatconvert_analyze", "omatconvert_get_nnz", "omatconvert",
"omatadd_buffer_size", "omatadd_analyze", "omatadd_get_nnz"]
Expand Down
1 change: 1 addition & 0 deletions deps/generate_interfaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ function generate_headers(library::String, filename::Vector{String}, output::Str
# The routine "optimize_trsm" has two versions.
suffix = ""
(name_routine == "optimize_trsm") && occursin("columns", header) && (suffix = "_advanced")
(name_routine == "optimize_gemm") && occursin("columns", header) && (suffix = "_advanced")
name_routine ∈ ("set_csr_data", "set_coo_data") && occursin("int64_t", header) && (suffix = "_64")
occursin("batch", name_routine) && !occursin("**", header) && (suffix = "_strided")

Expand Down
10 changes: 10 additions & 0 deletions deps/src/onemkl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4038,6 +4038,16 @@ extern "C" int onemklXsparse_optimize_trsv(syclQueue_t device_queue, onemklUplo
return 0;
}

extern "C" int onemklXsparse_optimize_gemm(syclQueue_t device_queue, onemklTranspose opA, matrix_handle_t A) {
auto status = oneapi::mkl::sparse::optimize_gemm(device_queue->val, convert(opA), (oneapi::mkl::sparse::matrix_handle_t) A, {});
return 0;
}

extern "C" int onemklXsparse_optimize_gemm_advanced(syclQueue_t device_queue, onemklLayout layout_val, onemklTranspose opA, onemklTranspose opB, matrix_handle_t A, int64_t columns) {
auto status = oneapi::mkl::sparse::optimize_gemm(device_queue->val, convert(layout_val), convert(opA), convert(opB), (oneapi::mkl::sparse::matrix_handle_t) A, columns, {});
return 0;
}

extern "C" int onemklXsparse_optimize_trsm(syclQueue_t device_queue, onemklUplo uplo_val, onemklTranspose opA, onemklDiag diag_val, matrix_handle_t A) {
auto status = oneapi::mkl::sparse::optimize_trsm(device_queue->val, convert(uplo_val), convert(opA), convert(diag_val), (oneapi::mkl::sparse::matrix_handle_t) A, {});
return 0;
Expand Down
7 changes: 7 additions & 0 deletions deps/src/onemkl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2842,6 +2842,13 @@ int onemklXsparse_optimize_trmv(syclQueue_t device_queue, onemklUplo uplo_val, o
int onemklXsparse_optimize_trsv(syclQueue_t device_queue, onemklUplo uplo_val, onemklTranspose
opA, onemklDiag diag_val, matrix_handle_t A);

int onemklXsparse_optimize_gemm(syclQueue_t device_queue, onemklTranspose opA, matrix_handle_t
A);

int onemklXsparse_optimize_gemm_advanced(syclQueue_t device_queue, onemklLayout layout_val,
onemklTranspose opA, onemklTranspose opB,
matrix_handle_t A, int64_t columns);

int onemklXsparse_optimize_trsm(syclQueue_t device_queue, onemklUplo uplo_val, onemklTranspose
opA, onemklDiag diag_val, matrix_handle_t A);

Expand Down
15 changes: 14 additions & 1 deletion lib/level-zero/common.jl
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
#define ZE_MAKE_VERSION( _major, _minor ) (( _major << 16 )|( _minor & 0x0000ffff))
"""
ze_make_version(major::Integer, minor::Integer) -> UInt32

32-bit unsigned integer version number from major and minor components.
This should be the Julia equivalent of the C macro:
`#define ZE_MAKE_VERSION( _major, _minor ) (( _major << 16 )|( _minor & 0x0000ffff))`
"""
function ZE_MAKE_VERSION(major::Integer, minor::Integer)
# Shift the major version 16 bits to the left
# and combine it with the minor version using a bitwise OR.
# The `& 0xffff` is implicit for standard integer types when combining,
# but we can be explicit if needed. The result is cast to UInt32.
return (UInt32(major) << 16) | (UInt32(minor) & 0x0000ffff)
end
unmake_version(ver) = VersionNumber(Int(ver) >> 16, Int(ver) & 0x0000ffff)
Loading