Skip to content

Use icpx instead of dpcpp on Linux #1226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 28, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Build library
run: |
python setup.py build_clib
CC=dpcpp python setup.py build_ext --inplace
CC=icpx python setup.py build_ext --inplace
python setup.py develop

- name: Build docs
Expand Down
4 changes: 2 additions & 2 deletions 0.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ python setup.py clean
python setup.py build_clib

# inplace build
CC=dpcpp python setup.py build_ext --inplace
CC=icpx python setup.py build_ext --inplace

# development build. Root privileges needed
# python setup.py develop

echo
echo =========example3==============
dpcpp -g -fPIC dpnp/backend/examples/example3.cpp -Idpnp -Idpnp/backend/include -Ldpnp -Wl,-rpath='$ORIGIN'/dpnp -ldpnp_backend_c -o example3
icpx -fsycl -g -fPIC dpnp/backend/examples/example3.cpp -Idpnp -Idpnp/backend/include -Ldpnp -Wl,-rpath='$ORIGIN'/dpnp -ldpnp_backend_c -o example3
# LD_DEBUG=libs,bindings,symbols ./example3
./example3

Expand Down
4 changes: 2 additions & 2 deletions dpnp/backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ string(CONCAT COMMON_LINK_FLAGS
"-fsycl-device-code-split=per_kernel "
)
if(UNIX)
set(CMAKE_CXX_COMPILER "dpcpp")
set(CMAKE_CXX_COMPILER "icpx")
# add_compile_options(-fPIC)
elseif(WIN32)
set(CMAKE_CXX_COMPILER "dpcpp")
set(CMAKE_CXX_COMPILER "icx")
# set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld-link")
# set(CMAKE_LINKER "lld-link")
# include (Platform/Windows-Clang)
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
conda activate CondaCodeCov
echo ============================================ build DPNP ============================================
python setup.py build_clib
CC=dpcpp python setup.py build_ext --inplace
CC=icpx python setup.py build_ext --inplace
echo ============================================ run code coverage =====================================
export OCL_ICD_FILENAMES=libintelocl.so
pytest --cov-report xml:coverage.xml --cov-report term-missing --cov=dpnp
Expand Down
4 changes: 2 additions & 2 deletions utils/command_build_clib.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
Set compiler for the project
"""
# default variables (for Linux)
_project_compiler = "dpcpp"
_project_linker = "dpcpp"
_project_compiler = "icpx"
_project_linker = "icpx"
_project_cmplr_flag_sycl_devel = ["-fsycl-device-code-split=per_kernel", "-fno-approx-func"]
_project_cmplr_flag_sycl = ["-fsycl"]
_project_cmplr_flag_stdcpp_static = [] # This brakes TBB ["-static-libstdc++", "-static-libgcc"]
Expand Down