-
Notifications
You must be signed in to change notification settings - Fork 990
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,3 +218,5 @@ work_dirs/ | |
*.exe | ||
*.out | ||
*.app | ||
|
||
compile_commands.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.PHONY: tree ln install build clean test | ||
|
||
tree: | ||
@tree --prune -I "__pycache__|*.egg-info|*.so|build" | ||
|
||
ln: | ||
@rm -rf build && cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CUDA_COMPILER=nvcc -B build && rm -rf compile_commands.json && ln -s build/compile_commands.json compile_commands.json | ||
|
||
install: | ||
@pip install -e . | ||
|
||
build: | ||
@python3 setup.py bdist_wheel | ||
|
||
clean: | ||
@rm -rf build dist *.egg-info | ||
|
||
test: | ||
@pytest tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
docker run --rm -it \ | ||
-v "$(pwd)":/sgl-kernel \ | ||
pytorch/manylinux-builder:cuda12.1 \ | ||
bash -c " | ||
pip install --no-cache-dir torch==2.4.0 --index-url https://download.pytorch.org/whl/cu121 && \ | ||
export TORCH_CUDA_ARCH_LIST='7.5 8.0 8.9 9.0+PTX' && \ | ||
cd /sgl-kernel && \ | ||
python setup.py bdist_wheel | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#include <torch/extension.h> | ||
#include <vector> | ||
|
||
torch::Tensor warp_reduce_cuda(torch::Tensor input); | ||
|
||
|