GithubHelp home page GithubHelp logo

hackerenrg / libclcxx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from khronosgroup/libclcxx

0.0 3.0 0.0 301 KB

Implementation of the OpenCL C++ library

License: Other

CMake 0.40% C++ 36.09% C 59.56% Cool 0.31% Python 3.64%

libclcxx's Introduction

OpenCL C++ Standard Library Instructions

The instructions how to build SPIR-V generator/Clang can be found here: https://github.com/KhronosGroup/SPIR/tree/spirv-1.1


Step 1: OpenCL C++ standard library

To clone the OpenCL C++ standard libary use the following cmdline:

  git clone https://github.com/KhronosGroup/libclcxx.git master

Step 2: Creating SPIR-V binaries

To create a SPIR-V binary from a valid OpenCL-C file (.cl), use the following command lines:

  clang -cc1 -emit-spirv -triple <triple> -cl-std=c++ -I <libclcxx dir> -x cl -o <output> <input>

Notes:

  • <triple>: for 32 bit SPIR-V use spir-unknown-unknown, for 64 bit SPIR-V use spir64-unknown-unknown.
  • -D: to enable support for extension. e.g. -Dcl_khr_mipmap_image compile option will enable mipmap support.
  • -cl-fp16-enable: to enable half support and define cl_khr_fp16
  • -cl-fp64-enable: to enable double support and define cl_khr_fp64
  • -O: -O0 (default) is the only tested option value at the moment. It's assumed by design that all optimizations are executed by SPIR-V consumer
  • <libclcxx dir>: path to include directory from libclcxx (https://github.com/KhronosGroup/libclcxx) .
  clang -cc1 -emit-spirv -triple=spir-unknown-unknown -cl-std=c++ -I include kernel.cl -o kernel.spir

Reporting issues

Bugs/feature requests can be filed via github or Khronos Bugzilla bug tracker.

libclcxx's People

Contributors

bsochack avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.