Skip to content

Commit 651b516

Browse files
Merge pull request #950 from IntelPython/adjust-examples-for-changes-in-dpctl4pybind11
Adjust examples for changes in dpctl4pybind11
2 parents 52773aa + b5f4a64 commit 651b516

File tree

6 files changed

+77
-91
lines changed

6 files changed

+77
-91
lines changed

examples/pybind11/external_usm_allocation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ to dpctl.memory entities using `__sycl_usm_array_interface__`.
77

88
# Building extension
99

10-
```
10+
```bash
1111
source /opt/intel/oneapi/compiler/latest/env/vars.sh
12-
CXX=dpcpp CC=dpcpp python setup.py build_ext --inplace
12+
CXX=icpx CC=icx python setup.py build_ext --inplace
1313
python -m pytest tests
1414
python example.py
1515
```

examples/pybind11/external_usm_allocation/external_usm_allocation/_usm_alloc_example.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,6 @@ py::list tolist(DMatrix &m)
134134

135135
PYBIND11_MODULE(_external_usm_alloc, m)
136136
{
137-
// Import the dpctl extensions
138-
import_dpctl();
139-
140137
py::class_<DMatrix> dm(m, "DMatrix");
141138
dm.def(py::init(&create_matrix),
142139
"DMatrix(dpctl.SyclQueue, n_rows, n_cols)");

examples/pybind11/onemkl_gemv/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ set_source_files_properties(${_sycl_gemm_sources}
5353
PROPERTIES
5454
COMPILE_OPTIONS "-O3"
5555
)
56+
target_link_options(${py_module_name} PRIVATE -fsycl-device-code-split=per_kernel)
5657

5758
add_executable(standalone_cpp
5859
EXCLUDE_FROM_ALL

0 commit comments

Comments
 (0)