Skip to content

This sample guide you how to use python call cuda via pybind11

Notifications You must be signed in to change notification settings

cam-ai/python_call_cuda_via_pybind11

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

python_call_cuda_via_pybind11

This sample guide you how to use python call cuda via pybind11

Install pre-request pybind11

sudo apt-get install python3-pybind11

Build

mkdir build
cd build
cmake ..
make
cd ..

Run

python test_add.py

Output

hello
7
result_shape w= 3
sum: 0 2.0 2.0 4.0
sum: 1 2.0 2.0 6.0
sum: 2 2.0 2.0 8.0
[4. 6. 8.]

About

This sample guide you how to use python call cuda via pybind11

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published