Coder Social home page Coder Social logo

yas-sim / python-dpcpp-extension-sample-code Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 1.93 MB

Python extension sample code using Intel oneAPI DPC++. The extension does a simple image processing using DPC++ kernel.

CMake 14.16% C++ 74.34% Python 8.90% Shell 2.60%
dpcpp sycl python-extension image-processing python oneapi opencl gpu-acceleration gpu-programming heterogeneous-parallel-programming

python-dpcpp-extension-sample-code's Introduction

Sample code of Python extension module using DPC++ (Data Parallel C++)

Description:

This project demonstrates how to write a Python extension module with DPC++. The Python extension will take an OpenCV image stored in a Numpy array and do image processing. The actual image processing code is using DPC++ kernel and the rest is written in standard C++ code.
DPC++ is a Clang based compiler developed by Intel which includs Khronos SYCL extension and Intel specific SYCL extensions. It enables seamless heterogeneous programming and can support not only CPU but also integrated GPU, FPGA and more to come.

  • Result example image

Prerequisites:

  • DPC++ compiler (from oneAPI Base Toolkit 2021.3)

How to build and run:

build.sh
  • python_dpcpp_module.so will be generated.
python3 test.py

Note:

Tested on Ubuntu 20.04.

python-dpcpp-extension-sample-code's People

Contributors

yas-sim avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

yogeshraje

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.