• This repository has been archived on 11/Aug/2023
  • Stars
    star
    322
  • Rank 130,398 (Top 3 %)
  • Language
    C
  • License
    Other
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

Collection of samples and utilities for using ComputeCpp, Codeplay's SYCL implementation

ComputeCppâ„¢

ComputeCpp SDK Readme

Build Status

Introduction

This is the README for the ComputeCpp SDK, a collection of sample code, utilities and tools for Codeplay’s ComputeCpp, an implementation of the SYCL programming standard. You can find more information at:

Contents

  • CMakeLists.txt
    • The entry point for this project’s CMake configuration. Adds samples/ subdirectory and optionally adds tests.
  • LICENSE.txt
    • The license this package is available under: Apache 2.0
  • README.md
    • This readme file
  • cmake/
    • Contains a CMake module for integrating ComputeCpp with existing projects. See later in this document for a description of the CMake module provided. There are also toolchains for generic GCC-like setups as well as the poky toolchain.
  • include/
    • add this directory to your include search path to be able to use SDK code in your own projects (for example, the virtual pointer utility).
  • samples/
    • A collection of sample SYCL code, tested on ComputeCpp, provided as a learning resource and starting point for new SYCL software. The samples are built with CMake.
  • demos/
    • A collection of graphical applications that use SYCL to accelerate calculations.
  • tests/
    • Tests for the utilities in the SDK.
  • tools/
    • Useful tools for working with SYCL code and ComputeCpp. Includes a simple driver script for compiling SYCL code with ComputeCpp, an example Makefile and other utilities.
  • util/
    • Example utility code that we expect will be useful for other projects as a starting point.

Supported Platforms

The master branch of computecpp-sdk is regularly tested with the "Supported" hardware listed on the ComputeCpp Supported Platforms page.

Pre-requisites

  • The samples should work with any SYCL 1.2.1 implementation, though have only been tested with ComputeCpp.
  • OpenCL 1.2-capable hardware and drivers with SPIR 1.2/SPIR-V support
  • C++11-compliant compiler and libstdc++ on GNU/Linux (GCC 4.9+, Clang 3.6+)
  • Microsoft Visual C++ 2015/2017 on Windows
  • CMake 3.4.3 and newer

Getting Started

On the Codeplay website there is a step-by-step guide to building and running the ComputeCpp SDK samples. There is also a guide to SYCL that serves as an introduction to SYCL development. Additionally, there is an Integration guide should you wish to add ComputeCpp to existing projects.

Setup

CMake files are provided as a build system for this software. CMake version 3.4.3 is required at minimum, though later versions of CMake should continue to be compatible.

At minimum, one CMake variable is required to get the sample code building - ComputeCpp_DIR. This variable should point to the root directory of the ComputeCpp install (i.e. the directory with the the folders bin, include, lib and so on). You can also specify COMPUTECPP_SDK_BUILD_TESTS to add the tests/ subdirectory to the build, which will build Gtest-based programs testing the legacy pointer and virtual pointer classes. Some samples have optional OpenMP support. You can enable it by setting COMPUTECPP_SDK_USE_OPENMP to ON in CMake.

You can additionally specify CMAKE_BUILD_TYPE and CMAKE_INSTALL_PREFIX to choose a Debug or Release build and the location you’d like to be used when the "install" target is built. The install target currently will copy all the sample binaries to the directory of your choosing.

Lastly, the SDK will build targeting spir64 IR by default. This will work on most devices, but won’t work on NVIDIA (for example). To that end, you can specify -DCOMPUTECPP_BITCODE=target, which can be any of spir[64], spirv[64] or ptx64. It is possible to specify multiple targets to COMPUTECPP_BITCODE, as a CMake list. Note that only the Professional Edition of ComputeCpp supports building multiple device targets.

If you would like to crosscompile the SDK targeting some other platform, there are toolchain files available in the cmake/toolchains directory. They require certain variables pointing to the root of the toolchain you are using to be set in the environment. They cannot be specificed in the CMake cache. The toolchains will identify which variables have not been set when used.

Troubleshooting

The sample code should compile without error on our supported platforms. If you run into trouble, or think you have found a bug, we have a support forum available through the ComputeCpp website.

Maintainers

This SDK is maintained by Codeplay Software Ltd. If you have any problems, please contact [email protected].

Acknowledgements

This repository contains code written by Sean Barrett (stb_image code in the Gaussian blur sample) and Charles Salvia (the stack allocator used in the smart pointer sample). Please see the files for their respective licences.

Contributions

This SDK is licensed under the Apache 2.0 license. Patches are very welcome! If you have an idea for a new sample, different build system integration or even a fix for something that is broken, please get in contact.

More Repositories

1

syclacademy

SYCL Academy, a set of learning materials for SYCL heterogeneous programming
HTML
454
star
2

portBLAS

An implementation of BLAS using the SYCL open standard.
C++
256
star
3

visioncpp

A machine vision library written in SYCL and C++ that shows performance-portable implementation of graph algorithms
C++
156
star
4

portDNN

portDNN is a library implementing neural network algorithms written using SYCL
C++
108
star
5

oneapi-construction-kit

C++
68
star
6

SYCL-ML

SYCL-ML is a C++ library, implementing classical machine learning algorithms using SYCL.
C++
61
star
7

SYCL-For-CUDA-Examples

Examples for using SYCL on CUDA
Shell
52
star
8

llvm-leg

Codeplay's tutorial LLVM LEG backend - as presented at the 2014 LLVM Developers' Meeting in San Jose.
C++
37
star
9

LPGPU2-CodeXL

LPGPU2 CodeXL power performance analysis and feedback tool for GPUs
C++
35
star
10

sycl-for-cuda

Codeplay project for contributions to the LLVM SYCL implementation
C++
30
star
11

standards-proposals

Repository for publicly sharing proposals in various standards groups
C++
27
star
12

portFFT

portFFT is a library implementing Fast Fourier Transforms using SYCL
C++
14
star
13

sycl-info

Tool to show information about available SYCL implementations
C++
11
star
14

cuda-to-sycl-nbody

C++
11
star
15

lldb-msp430

Codeplay's tutorial LLDB-MSP430 - as presented at the 2016 EuroLLVM Developers' Meeting in Barcelona.
C++
10
star
16

parallelts-range-exploration

Repository to exchange current work with rangesTS and Parallel STL
C++
8
star
17

SYCL-samples

A collection of samples written using the SYCL standard for C++.
C++
8
star
18

blog-ray

SYCL enabled ray tracer
C++
6
star
19

sycl-project-list

SYCL Open Source Projects List
4
star
20

sycl.tech-website

Angular front-end for the SYCL.tech website.
TypeScript
3
star
21

sycl.tech-content

Content for the SYCL.tech Website
Python
3
star
22

CUDA_to_SYCL_examples

Example code for the guide
C++
3
star
23

py_gen

Python library for generating C++ code
Python
3
star
24

sycl-crowd-simulation

A crowd simulation algorithm implemented using C++ and SYCL.
Python
3
star
25

mlir-sycl

C++
3
star
26

syclops-website

SYCLOPS Research Project Website
HTML
2
star
27

TensorOpt

C++
2
star
28

SYCLcompat

1
star
29

clang-leg

Codeplay's tutorial Clang LEG changes - as presented at the 2014 LLVM Developers' Meeting in San Jose.
C++
1
star
30

onnxruntime

Codeplay's fork of the onnxruntime open source project adding a SYCL backend providing DNN model support across various SYCL-enabled hardware targets.
C++
1
star
31

computecpp-cmake-template

CMake
1
star
32

Template-Repo

Makefile
1
star