https://github.com/huangcongqing/cuda-learning
cuda编程学习入门
https://github.com/huangcongqing/cuda-learning
cuda cuda-kernels cuda-programming
Last synced: 3 months ago
JSON representation
cuda编程学习入门
- Host: GitHub
- URL: https://github.com/huangcongqing/cuda-learning
- Owner: HuangCongQing
- License: mit
- Created: 2022-02-02T12:07:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-22T09:40:25.000Z (11 months ago)
- Last Synced: 2025-03-28T19:07:41.448Z (3 months ago)
- Topics: cuda, cuda-kernels, cuda-programming
- Language: Cuda
- Homepage:
- Size: 5.66 MB
- Stars: 34
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cuda-learning
cuda学习入门Note: https://www.yuque.com/huangzhongqing/hpc/pz921g (暂未公开)
## 编译运行
```
mkdir build
cd build
cmake ..
make
``````
nvcc hello-gpu.cu -o hello-gpu
# 调试
nvcc -g -G hello-gpu.cu -o hello-gpu
```## PyTorch加入自定义Cuda算子demo
* docs: https://www.yuque.com/huangzhongqing/cuda/wqexr9
* code: [python_using_cpp_cuda](./python_using_cpp_cuda)
* ref: https://github.com/JeffWang987/Python_Using_Cpp_CUDA```shell
# 编译cuda生成.so文件
python setup.py develop
# 测试运行
python ball_query_example.py```
## CUDA相关库
* [cub](cuda_lib/cub)
* [thrust](cuda_lib/thrust)
* [cublas](cuda_lib/cublas)
* [cutlass](cuda_lib/cutlass)### [cub](cuda_lib/cub)
* TODO### [thrust](cuda_lib/thrust)
* TODO### [cublas](cuda_lib/cublas)
下面是测试[demo](cuda_lib/cublas/test_gemm.cpp)
```shell
# 编译:
nvcc test_gemm.cpp -o test_gemm -L/usr/local/cuda/lib64 -lcudart -lcuda -lcublas
# 运行:
./test_gemm
```
链接:https://zhuanlan.zhihu.com/p/403247313### [cutlass](cuda_lib/cutlass)
* TODO