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
16 changes: 15 additions & 1 deletion dpctl_ext/tensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ set(_sorting_sources
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/sorting/searchsorted.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/sorting/topk.cpp
)
set(_linalg_sources
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/elementwise_functions/elementwise_functions_type_utils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/linalg_functions/dot.cpp
)
set(_tensor_accumulation_impl_sources
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/tensor_accumulation.cpp
${_accumulator_sources}
Expand All @@ -182,6 +186,10 @@ set(_tensor_sorting_impl_sources
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/tensor_sorting.cpp
${_sorting_sources}
)
set(_tensor_linalg_impl_sources
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/tensor_linalg.cpp
${_linalg_sources}
)

set(_static_lib_trgt simplify_iteration_space)

Expand Down Expand Up @@ -228,6 +236,12 @@ add_sycl_to_target(TARGET ${python_module_name} SOURCES ${_tensor_sorting_impl_s
target_link_libraries(${python_module_name} PRIVATE ${_static_lib_trgt})
list(APPEND _py_trgts ${python_module_name})

set(python_module_name _tensor_linalg_impl)
pybind11_add_module(${python_module_name} MODULE ${_tensor_linalg_impl_sources})
add_sycl_to_target(TARGET ${python_module_name} SOURCES ${_tensor_linalg_impl_sources})
target_link_libraries(${python_module_name} PRIVATE ${_static_lib_trgt})
list(APPEND _py_trgts ${python_module_name})

set(_clang_prefix "")
if(WIN32)
set(_clang_prefix "/clang:")
Expand All @@ -245,7 +259,7 @@ list(
${_elementwise_sources}
${_reduction_sources}
${_sorting_sources}
# ${_linalg_sources}
${_linalg_sources}
${_accumulator_sources}
)

Expand Down
10 changes: 10 additions & 0 deletions dpctl_ext/tensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@
take,
take_along_axis,
)
from ._linear_algebra_functions import (
matmul,
matrix_transpose,
tensordot,
vecdot,
)
from ._manipulation_functions import (
broadcast_arrays,
broadcast_to,
Expand Down Expand Up @@ -216,6 +222,8 @@
"min",
"moveaxis",
"permute_dims",
"matmul",
"matrix_transpose",
"negative",
"nonzero",
"ones",
Expand Down Expand Up @@ -251,6 +259,7 @@
"take_along_axis",
"tan",
"tanh",
"tensordot",
"tile",
"top_k",
"to_numpy",
Expand All @@ -262,6 +271,7 @@
"unique_inverse",
"unique_values",
"unstack",
"vecdot",
"where",
"zeros",
"zeros_like",
Expand Down
Loading
Loading