Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
IntelPython
dpctl
Repository navigation
Code
Issues
37
(37)
Pull requests
11
(11)
Discussions
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
3337a6728eceadab73fdd203c360c97527460ed0
Breadcrumbs
dpctl
/
examples
/
pybind11
/
use_dpctl_sycl_kernel
/
CMakeLists.txt
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
39 lines (32 loc) · 1.25 KB
3337a67
Breadcrumbs
dpctl
/
examples
/
pybind11
/
use_dpctl_sycl_kernel
/
CMakeLists.txt
Copy path
Top
File metadata and controls
Code
Blame
39 lines (32 loc) · 1.25 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required
(
VERSION
3.21...3.27
FATAL_ERROR
)
project
(use_queue_device
VERSION
0.1
LANGUAGES
CXX
DESCRIPTION
"Example of using dpctl.program.SyclKernel <-> sycl::kernel type casting"
)
set
(DPCTL_CMAKE_MODULES_PATH
"
${
CMAKE_SOURCE_DIR
}
/../../../cmake"
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${DPCTL_CMAKE_MODULES_PATH}
)
find_package
(
IntelSYCL
REQUIRED
PATHS
${DPCTL_CMAKE_MODULES_PATH}
NO_DEFAULT_PATH
)
set
(
CMAKE_CXX_STANDARD
17)
set
(
CMAKE_CXX_STANDARD_REQUIRED
True
)
set
(
CMAKE_BUILD_TYPE
Debug)
#
Fetch pybind11
include
(
FetchContent
)
FetchContent_Declare
(
pybind11
URL
https://github.com/pybind/pybind11/archive/refs/tags/v2.13.6.tar.gz
URL_HASH
SHA256=e08cb87f4773da97fa7b5f035de8763abc656d87d5773e62f6da0587d1f0ec20
FIND_PACKAGE_ARGS
NAMES pybind11
)
FetchContent_MakeAvailable
(pybind11)
find_package
(
Python
REQUIRED
COMPONENTS
Development.Module
NumPy
)
find_package
(
Dpctl
REQUIRED
)
set
(py_module_name _use_kernel)
set
(_sources use_kernel/_example.cpp)
pybind11_add_module
(
${py_module_name}
MODULE
${_sources}
)
add_sycl_to_target
(
TARGET
${py_module_name}
SOURCES
${_sources}
)
target_include_directories
(
${py_module_name}
PUBLIC
${Dpctl_INCLUDE_DIRS}
)
install
(
TARGETS
${py_module_name}
DESTINATION
use_kernel
)
set
(ignoreMe
"
${SKBUILD}
"
)
You can’t perform that action at this time.