Skip to content

changes to compiler name usage from clang++ to dpcpp #270

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 3 commits into from
Feb 4, 2021
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
4 changes: 2 additions & 2 deletions dpctl-capi/cmake/modules/FindLevelZero.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
# LEVEL_ZERO_LIBRARY - the full path to the ze_loader library
# TODO: Add a way to record the version of the level_zero library

find_library(LEVEL_ZERO_LIBRARY ze_loader)
find_path(LEVEL_ZERO_INCLUDE_DIR NAMES level_zero/zet_api.h)
find_library(LEVEL_ZERO_LIBRARY ze_loader HINTS $ENV{L0_LIB_DIR})
find_path(LEVEL_ZERO_INCLUDE_DIR NAMES level_zero/zet_api.h HINTS $ENV{L0_INCLUDE_DIR})

find_package_handle_standard_args(LevelZero DEFAULT_MSG
LEVEL_ZERO_INCLUDE_DIR
Expand Down
4 changes: 3 additions & 1 deletion scripts/build_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"-DCMAKE_PREFIX_PATH=" + INSTALL_PREFIX,
"-DDPCPP_INSTALL_DIR=" + DPCPP_ROOT,
"-DCMAKE_C_COMPILER:PATH=" + os.path.join(DPCPP_ROOT, "bin", "clang"),
"-DCMAKE_CXX_COMPILER:PATH=" + os.path.join(DPCPP_ROOT, "bin", "clang++"),
"-DCMAKE_CXX_COMPILER:PATH=" + os.path.join(DPCPP_ROOT, "bin", "dpcpp"),
"-DDPCTL_ENABLE_LO_PROGRAM_CREATION=ON",
backends,
]
Expand All @@ -83,6 +83,8 @@
"-DCMAKE_INSTALL_PREFIX=" + INSTALL_PREFIX,
"-DCMAKE_PREFIX_PATH=" + INSTALL_PREFIX,
"-DDPCPP_INSTALL_DIR=" + DPCPP_ROOT,
"-DCMAKE_C_COMPILER:PATH=" + os.path.join(DPCPP_ROOT, "bin", "clang-cl.exe"),
"-DCMAKE_CXX_COMPILER:PATH=" + os.path.join(DPCPP_ROOT, "bin", "dpcpp.exe"),
backends,
]
subprocess.check_call(cmake_args, stderr=subprocess.STDOUT, shell=True)
Expand Down
6 changes: 1 addition & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,11 @@

if IS_LIN:
DPCPP_ROOT = os.environ["ONEAPI_ROOT"] + "/compiler/latest/linux"
os.environ["CC"] = DPCPP_ROOT + "/bin/clang"
os.environ["CXX"] = DPCPP_ROOT + "/bin/clang++"
os.environ["DPCTL_SYCL_INTERFACE_LIBDIR"] = "dpctl"
os.environ["DPCTL_SYCL_INTERFACE_INCLDIR"] = "dpctl/include"
os.environ["CFLAGS"] = "-fPIC"

elif IS_WIN:
os.environ["CC"] = "clang-cl.exe"
os.environ["CXX"] = "dpcpp.exe"
os.environ["DPCTL_SYCL_INTERFACE_LIBDIR"] = "dpctl"
os.environ["DPCTL_SYCL_INTERFACE_INCLDIR"] = "dpctl\include"

Expand Down Expand Up @@ -86,7 +82,7 @@ def get_sdl_ldflags():

def get_other_cxxflags():
if IS_LIN:
return ["-O3", "-fsycl", "-std=c++17"]
return ["-O3", "-std=c++17"]
elif IS_MAC:
return []
elif IS_WIN:
Expand Down