Conversation
Contributor
|
The failure on Windows is due to The suggested solution is to renamed to CMake module. |
Contributor
Author
The logic to build the backend is moved inside a function, allowing to pass argument controlling the build. Currently this is used to specify whether to use L0 support (hardcoded to True), but opens a door to specify custom compiler to use to build SyclInterface library. setup.py no longer uses subprocess to invoke build_backed, but uses importlib to import the function defined there and calls the function with appropriate arguments. scipts/build_backend.py retains the function of the script, calling the build_backend function with default arguments (no L0 support)
49b3902 to
f04a81b
Compare
Contributor
|
The following worked file for me: # here $LDH is path to local-disk-home
python setup.py develop --sycl-compiler-prefix=${LDH}/sycl_workspace/llvm/build |
diptorupd
commented
May 21, 2021
python setup.py develop ---help displays them, with use messaes Options are --level-zerop-support=(true|false) --coverage=(true|false) --sycl-compiler-path=(path to prefix, optional) If path is not provided backend builder looks up ONEAPI_ROOT variable. In the path, builder looks for bin/dpcpp (Linux), or bin/dpcpp.exe (Windows). If found, cmake does see -DDPCTL_DPCPP_ROOT variable set. Otherwise the variable is set, and clang++ is used instead of dpcpp
f04a81b to
e44d1a5
Compare
Contributor
|
README and Quickstart documents were modified. |
Closed
CODE_COVERAGE was used to influence whether the backend SyclInterface library was built in debug mode with coverage over dpctp-capi/ test suite collected or not. It was also influencing how Cython extensions were built. It would pass linetrace=true option to cythonize, and define CYTHON_TRACE preprocessor variable when compiling Cython-generated C++ source files with compiler. This change removes use CODE_COVERAGE all together. Instead: 1. Custom setuptools command 'build_ext' is implemented which auto-adds 'CYTHON_TRACE' to the list of defines received by downstream build_ext command if develop command received --coverage=True cythonize call was removed from extensions() function, allowing ``python setup.py develop --help` execute cleanly without running cythonize. Consequentially, linetrace Cython directive will need to be added to each .pyx file in a separate commit. This is safe to do per https://cython.readthedocs.io/en/latest/src/tutorial/profiling_tutorial.html#enabling-line-tracing since it is a no-op unless CYTHON_TRACE preprocessor variable is also set, which is only done when --coverage=True is used 2. install setuptools command removed support for `--coverage` option, and always builds backend without coverage. This is to avoid inadvertent installation of debug build of library in Python prefix.
This is safe to do per https://cython.readthedocs.io/en/latest/src/tutorial/profiling_tutorial.html#enabling-line-tracing Its use allows improved coverage testing of Cython modules when Cython sources are compiled with CYTHON_TRACE/CYTHON_TRACE_NOGIL preprocessor variables defined.
3eee7d1 to
d768dbd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #361
build_backend.pyis not invoked using a sub-process. We now useimportlibto properly import the file as a module.build_backend.pynow provides a function to run the build steps to compileDPCTLSyclInteface.build_backend.pyto make it possible to pass in different build options. Presently, the only new option that was added isl0_support.setup.py.