Skip to content

Commit 32bf0a6

Browse files
author
Diptorup Deb
authored
Merge pull request #426 from IntelPython/setup_pie
Improvements to setup.py
2 parents b3dac2f + d768dbd commit 32bf0a6

File tree

14 files changed

+370
-170
lines changed

14 files changed

+370
-170
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ For development:
6767
python setup.py develop
6868
```
6969

70+
It is also possible to build dpctl using [DPC++ toolchain](https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md) instead of oneAPI DPC++. Instead of activating the oneAPI environment, indicate the toolchain installation prefix with `--sycl-compiler-prefix` option, e.g.
71+
72+
```cmd
73+
python setup.py develop --sycl-compiler-prefix=${DPCPP_ROOT}/llvm/build
74+
```
75+
76+
Please use `python setup.py develop --help` for more details.
77+
7078
Install Wheel Package from Pypi
7179
==================================
7280
1. Install dpctl

docs/docfiles/user_guides/QuickStart.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,19 @@ to build and install
165165
Building using custom dpcpp
166166
~~~~~~~~~~~~~~~~~~~~~~~~~~~
167167

168-
.. todo::
168+
It is possible to build dpctl from source using .. _DPC++ toolchain: https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md
169+
instead of the DPC++ compiler that comes with oneAPI. One reason for doing this
170+
may be to enable support for CUDA devices.
169171

170-
Instructions coming soon.
172+
Following steps in :ref:`Build and Install with setuptools` use command line
173+
option :code:`--sycl-compiler-prefix`, for example:
174+
175+
.. code-block:: bash
176+
177+
python setup.py develop --sycl-compiler-prefix=${DPCPP_ROOT}/llvm/build
178+
179+
Available options and their descriptions can be retrieved using option
180+
:code:`--help`.
171181

172182
Using dpctl
173183
-----------

dpctl/_sycl_context.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# distutils: language = c++
1818
# cython: language_level=3
19+
# cython: linetrace=True
1920

2021
""" Implements SyclContext Cython extension type.
2122
"""

dpctl/_sycl_device.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# distutils: language = c++
1818
# cython: language_level=3
19+
# cython: linetrace=True
1920

2021
""" Implements SyclDevice Cython extension type.
2122
"""

dpctl/_sycl_device_factory.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# distutils: language = c++
1818
# cython: language_level=3
19+
# cython: linetrace=True
1920

2021
""" This module implements several device creation helper functions:
2122

dpctl/_sycl_event.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# distutils: language = c++
1818
# cython: language_level=3
19+
# cython: linetrace=True
1920

2021
""" Implements SyclEvent Cython extension type.
2122
"""

dpctl/_sycl_platform.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#
1717
# distutils: language = c++
1818
# cython: language_level=3
19+
# cython: linetrace=True
1920

2021
""" Implements SyclPlatform Cython extension type.
2122
"""

dpctl/_sycl_queue.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# distutils: language = c++
1818
# cython: language_level=3
19+
# cython: linetrace=True
1920

2021
""" Implements SyclQueue Cython extension type.
2122
"""

dpctl/_sycl_queue_manager.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#
1717
# distutils: language = c++
1818
# cython: language_level=3
19+
# cython: linetrace=True
1920

2021
from __future__ import print_function
2122

dpctl/memory/_memory.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# distutils: language = c++
1818
# cython: language_level=3
19+
# cython: linetrace=True
1920

2021
"""This file implements Python buffer protocol using Sycl USM shared and host
2122
allocators. The USM device allocator is also exposed through this module for

0 commit comments

Comments
 (0)