• Stars
    star
    221
  • Rank 178,954 (Top 4 %)
  • Language LLVM
  • License
    Other
  • Created over 2 years ago
  • Updated 14 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SYCLomatic

Introduction

SYCLomatic is a project to assist developers in migrating their existing code written in different programming languages to the SYCL* C++ heterogeneous programming model. Final code editing and verification is a manual process done by the developer.

Use c2s command to make it as easy as possible to migrate existing CUDA codebases to SYCL, which is an industry standard. Once code is migrated to SYCL, it can be compiled and executed by any compiler that implements the SYCL specification as shown here: https://www.khronos.org/sycl/

The SYCLomatic development branch is the SYCLomatic branch.

Releases

Daily builds of the SYCLomatic branch on Linux and Windows* are available at releases. A few times a year, we publish Release Notes to highlight all important changes made in the project: features implemented and issues addressed. The corresponding builds can be found using search in daily releases. None of the branches in the project are stable or rigorously tested for production quality control, so the quality of these releases is expected to be similar to the daily releases.

Build from source code

Prerequisites

Create SYCLomatic workspace

Throughout this document SYCLOMATIC_HOME denotes the path to the local directory created as SYCLomatic workspace. It might be useful to create an environment variable with the same name.

Linux:

export SYCLOMATIC_HOME=~/workspace
export PATH_TO_C2S_INSTALL_FOLDER=~/workspace/c2s_install
mkdir $SYCLOMATIC_HOME
cd $SYCLOMATIC_HOME

git clone https://github.com/oneapi-src/SYCLomatic.git

Windows (64-bit):

Open a developer command prompt using one of two methods:

  • Click start menu and search for "x64 Native Tools Command Prompt for VS XXXX", where XXXX is a version of installed Visual Studio.
  • Ctrl-R, write "cmd", click enter, then run "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
set SYCLOMATIC_HOME=%USERPROFILE%\workspace
set PATH_TO_C2S_INSTALL_FOLDER=%USERPROFILE%\workspace\c2s_install
mkdir %SYCLOMATIC_HOME%
cd %SYCLOMATIC_HOME%

git clone https://github.com/oneapi-src/SYCLomatic.git

Build SYCLomatic

Linux:

cd $SYCLOMATIC_HOME
mkdir build
cd build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$PATH_TO_C2S_INSTALL_FOLDER  -DCMAKE_BUILD_TYPE=Release  -DLLVM_ENABLE_PROJECTS="clang"  -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" ../SYCLomatic/llvm
ninja install-c2s

Windows (64-bit):

cd %SYCLOMATIC_HOME%
mkdir build
cd build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=%PATH_TO_C2S_INSTALL_FOLDER%  -DCMAKE_BUILD_TYPE=Release  -DLLVM_ENABLE_PROJECTS="clang"  -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" ..\SYCLomatic\llvm
ninja install-c2s

Note: For build system with 16G or less memory, to avoid out of memory issues, it is recommended to add the option -DLLVM_PARALLEL_LINK_JOBS=1 in the CMake step and use 4 or less total parallel jobs when building SYCLomatic by invoking ninja with the option -j4:

ninja -j4 install-c2s

build success message:

After a successful build, you should be able to see following message in the terminal output.

-- Install configuration: "Release"
-- Installing: ... bin/dpct
-- Creating c2s

Environment Setup

Linux:

export PATH=$PATH_TO_C2S_INSTALL_FOLDER/bin:$PATH
export CPATH=$PATH_TO_C2S_INSTALL_FOLDER/include:$CPATH

Windows (64-bit):

SET PATH=%PATH_TO_C2S_INSTALL_FOLDER%\bin;%PATH%
SET INCLUDE=%PATH_TO_C2S_INSTALL_FOLDER%\include;%INCLUDE%
SET CPATH=%PATH_TO_C2S_INSTALL_FOLDER%\include;%CPATH%

Verify the Installation

Before running SYCLomatic, it is important to verify that dpct/c2s(SYCLomatic binary) is installed correctly and PATH is set properly.

To do this, try running the following command and checking if dpct is available after the installation.

c2s --version

Note: If c2s cannot be found, please check the setup of PATH.

Run SYCLomatic

Run c2s command

Get c2s help information by running "c2s --help". dpct is an alias command for c2s.

Test SYCLomatic

Run in-tree LIT tests

Note: Certain CUDA header files may need to be accessible to the tool. After build the SYCLomatic, you can run the list test by:

ninja check-clang-c2s

Run E2E test suite (Recommend for contributors)

Follow instructions from the link below to build and run tests: README

Known Issues and Limitations

  • SYCL* 2020 support work is in progress.
  • 32-bit host/target is not supported.

Useful Links

License

See LICENSE for details.

Contributing

See CONTRIBUTING.md for details.

Trademarks information

Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries.
*Other names and brands may be claimed as the property of others. SYCL is a trademark of the Khronos Group Inc.

More Repositories

1

oneTBB

oneAPI Threading Building Blocks (oneTBB)
C++
5,603
star
2

oneDNN

oneAPI Deep Neural Network Library (oneDNN)
C++
3,576
star
3

oneAPI-samples

Samples for Intel® oneAPI Toolkits
C++
922
star
4

oneDPL

oneAPI DPC++ Library (oneDPL) https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/dpc-library.html
C++
720
star
5

oneDAL

oneAPI Data Analytics Library (oneDAL)
C++
607
star
6

oneMKL

oneAPI Math Kernel Library (oneMKL) Interfaces
C++
606
star
7

level-zero

oneAPI Level Zero Specification Headers and Loader
C++
210
star
8

oneCCL

oneAPI Collective Communications Library (oneCCL)
C++
188
star
9

oneVPL

oneAPI Video Processing Library (oneVPL) dispatcher, tools, and examples
C++
173
star
10

oneAPI-spec

oneAPI Specification source files
Python
165
star
11

oneapi-ci

Sample configuration files for using oneAPI in CI systems
Shell
92
star
12

oneVPL-intel-gpu

C++
86
star
13

oneAPI-tab

oneAPI Technical Advisory Board (TAB) Meeting Notes
71
star
14

distributed-ranges

Distributed ranges is a generalization of C++ ranges for distributed data structures.
C++
46
star
15

level-zero-tests

oneAPI Level Zero Conformance & Performance test content
C++
45
star
16

Velocity-Bench

C++
42
star
17

unified-runtime

C++
31
star
18

unified-memory-framework

A library for constructing allocators and memory pools. It also contains broadly useful abstractions and utilities for memory management. UMF allows users to manage multiple memory pools characterized by different attributes, allowing certain allocation types to be isolated from others and allocated using different hardware resources as required.
C
31
star
19

oneVPL-cpu

oneAPI Video Processing Library (oneVPL) CPU implementation. This GitHub repository is no longer active. See ReadMe for more information.
C++
25
star
20

level-zero-spec

Python
17
star
21

ishmem

Intel® SHMEM - Device initiated shared memory based communication library
C++
15
star
22

drone-navigation-inspection

AI Starter Kit for AI applications in Drone technology using Intel® Optimized Tensorflow*
Python
13
star
23

predictive-asset-health-analytics

AI Starter Kit for Predictive Asset Maintenance using Intel® optimized version of XGBoost
HTML
13
star
24

SYCLomatic-test

LLVM
13
star
25

text-data-generation

AI Starter Kit for AI Unstructured Synthetic Data Generation using Intel® Extension for Pytorch
Python
10
star
26

traffic-camera-object-detection

AI Starter Kit for traffic camera object detection using Intel® Extension for Pytorch
Python
10
star
27

invoice-to-cash-automation

Ai starter kit for trade promotion and claim documents categorization using pytorch* and Tensorflow*
Python
7
star
28

demand-forecasting

AI Starter Kit for demand forecasting using Intel® Optimized Tensorflow*
Python
7
star
29

disease-prediction

AI Starter Kit for the implementation of AI-based NLP Disease Prediction system using Intel® Extension for PyTorch* and Intel® Neural Compressor
Python
7
star
30

computational-fluid-dynamics

AI Starter Kit for fluid Flow Profiling using Intel® Optimized Tensorflow*
Python
6
star
31

historical-assets-document-process

AI Starter Kit for Historical Assets document processing using Intel® Extension for Pytorch
Python
6
star
32

network-intrusion-detection

AI Starter Kit for Network Intrusion Detection using Intel® Extension for Scikit-learn*
Python
6
star
33

ai-transcribe

AI Starter Kit for the implementation of an AI transcribe system using Intel® Extension for PyTorch*
Python
6
star
34

level-zero-intel-gpu

5
star
35

structural-damage-assessment

AI Starter Kit for applications in Satellite Image processing using Intel® Extension for Pytorch
Python
5
star
36

digital-twin

AI Starter Kit to build a MOSFET Digital Twin for Design Exploration using Intel® optimized version of XGBoost
Python
4
star
37

medical-imaging-diagnostics

AI Starter Kit for image-based abnormalities for different diseases classification using Intel® Optimized Tensorflow*
Python
4
star
38

visual-quality-inspection

AI Starter Kit for Quality Visual Inspection using Intel® Extension for Pytorch
Python
4
star
39

customer-chatbot

AI Starter Kit for Customer Chatbot using Intel® Extension for Pytorch
Python
3
star
40

distributed-ranges-tutorial

C++
3
star
41

purchase-prediction

AI Starter Kit for Purchase Prediction model using Intel® Extension for Scikit-learn*
Python
3
star
42

customer-segmentation

AI Starter Kit for Customer Segmentation for Online Retail using Intel® Extension for Scikit-learn*
Python
3
star
43

powerline-fault-detection

AI Starter Kit for detect faulty signals in power line voltage using Intel® Extension for Scikit-learn*
Python
3
star
44

image-data-generation

AI Starter Kit for Synthetic Image Generation using Intel® Optimized Tensorflow*
Python
2
star
45

intelligent-indexing

AI Starter Kit for Intelligent Indexing of Incoming Correspondence using Intel® Extension for Scikit-learn*
Python
2
star
46

unified-runtime-spec

2
star
47

visual-process-discovery

AI Starter Kit for Visual Process Discovery using Intel® Extension for Pytorch
Python
2
star
48

vertical-search-engine

AI Starter Kit for Semantic Vertical Search Engines using Intel® Extension for Pytorch
Python
2
star
49

document-automation

AI Starter Kit for Named Entity Recognition using Intel® Optimized Tensorflow (version 2.9.0 with oneDNN)
Python
2
star
50

ai-structured-data-generation

AI Starter Kit to generate structured synthetic data using Intel® Distribution of Modin
Python
1
star
51

voice-data-generation

AI Starter Kit for Synthetic Voice and Audio Generation using Intel® Extension for Pytorch
Python
1
star
52

order-to-delivery-time-forecasting

AI Starter Kit of a delivery time forecasting solution using Intel® optimized version of XGBoost
1
star
53

product-recommendations

AI Starter Kit for product recommendation system using Intel® Extension for Scikit-learn*
Jupyter Notebook
1
star
54

customer-churn-prediction

AI Starter Kit for customer churn prediction using Intel® Extension for Scikit-learn*
Python
1
star
55

credit-card-fraud-detection

AI Starter Kit for Credit Card Fraud Detection model using Intel® Extension for Scikit-learn*
Python
1
star
56

loan-default-risk-prediction

AI Starter Kit to predict probability of a loan default from client using Intel® optimized version of XGBoost
Python
1
star
57

ai-data-protection

AI Starter Kit for Personal Identifiable Information Anonymization using Intel® Extension for Pytorch
Python
1
star
58

engineering-design-optimization

AI Starter Kit for Engineering Design Optimization using Intel® Extension for Pytorch
Python
1
star
59

data-streaming-anomaly-detection

AI Starter Kit for Data Streaming Anomaly Detection using Intel® Optimized Tensorflow*
Python
1
star