Skip to content

[svm][SYCL] In-order queue and native commands #101

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions svm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ SYCL for Nvidia backend - CC=clang CXX=clang++ cmake -DUSE_NVIDIA_BACKEND=TRUE -
SYCL for AMD backend - CC=clang CXX=clang++ cmake -DUSE_AMD_BACKEND=TRUE -DUSE_AMD_ARCH={flag for hip i.e 90a for MI250} ../ \
make \


### In-order queue
The CMake option `-DIN_ORDER_QUEUE` adds the `in_order` property to the SYCL
queue, as well as `discard_events` if available. The default value of this
option is `ON` for NVIDIA and AMD backends, and `OFF` otherwise.

### Running the workload
./svm_sycl a9a a.m

Expand Down
15 changes: 14 additions & 1 deletion svm/SYCL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ option(GPU_AOT "Build AOT for Intel GPU" OFF)
option(USE_NVIDIA_BACKEND "Build for NVIDIA backend" OFF)
option(USE_AMD_BACKEND "Build for AMD HIP backend" OFF)

set(IN_ORDER_QUEUE_DEFAULT OFF)
if (${USE_NVIDIA_BACKEND} OR ${USE_AMD_BACKEND})
set(IN_ORDER_QUEUE_DEFAULT ON)
endif()
option(IN_ORDER_QUEUE "Use in-order SYCL queue" ${IN_ORDER_QUEUE_DEFAULT})

set(SOURCES
cuSVM/cuSVMSolver.dp.cpp
cuSVM/cuSVM_wrapper.cpp
Expand All @@ -78,7 +84,8 @@ set(SOURCES
include_directories(${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/libSVM
${CMAKE_SOURCE_DIR}/cuSVM
${CMAKE_SOURCE_DIR}/infrastructure)
${CMAKE_SOURCE_DIR}/infrastructure
${CMAKE_SOURCE_DIR}/../../infrastructure)


# Use either default or user defined CXX flags
Expand All @@ -91,6 +98,12 @@ set(DEF_INTEL_GENERAL_CXX_FLAGS " -O3 -fsycl ")
set(DEF_NVIDIA_GENERAL_CXX_FLAGS " -O3 -fsycl ")
set(DEF_AMD_GENERAL_CXX_FLAGS " -O3 -fsycl -D__HIP_PLATFORM_AMD__ ")

if (${IN_ORDER_QUEUE})
string(APPEND DEF_INTEL_GENERAL_CXX_FLAGS " -DIN_ORDER_QUEUE ")
string(APPEND DEF_NVIDIA_GENERAL_CXX_FLAGS " -DIN_ORDER_QUEUE ")
string(APPEND DEF_AMD_GENERAL_CXX_FLAGS " -DIN_ORDER_QUEUE ")
endif()

if(NOT "${CMAKE_CXX_FLAGS}" STREQUAL "" AND NOT "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
message(FATAL_ERROR "Both CMAKE_CXX_FLAGS and OVERRIDE_GENERAL_CXX_FLAGS cannot be passed in together")
elseif("${CMAKE_CXX_FLAGS}" STREQUAL "" AND "${OVERRIDE_GENERAL_CXX_FLAGS}" STREQUAL "")
Expand Down
118 changes: 0 additions & 118 deletions svm/SYCL/common/SYCL.cpp

This file was deleted.

97 changes: 0 additions & 97 deletions svm/SYCL/common/SYCL.h

This file was deleted.

Loading