2
.gitignore
vendored
2
.gitignore
vendored
@@ -131,4 +131,4 @@ dataset/
|
||||
output/
|
||||
|
||||
# gen codes
|
||||
autogen/
|
||||
autogen/
|
||||
|
||||
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[submodule "csrc/third_party/cutlass"]
|
||||
path = csrc/third_party/cutlass
|
||||
url = https://github.com/NVIDIA/cutlass.git
|
||||
[submodule "csrc/third_party/nlohmann_json"]
|
||||
path = csrc/third_party/nlohmann_json
|
||||
url = https://github.com/nlohmann/json.git
|
||||
@@ -17,7 +17,14 @@ import subprocess
|
||||
|
||||
import paddle
|
||||
from paddle.utils.cpp_extension import CUDAExtension, setup
|
||||
import subprocess
|
||||
|
||||
def update_git_submodule():
|
||||
try:
|
||||
subprocess.run(["git", "submodule", "update", "--init"], check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Error occurred while updating git submodule: {str(e)}")
|
||||
raise
|
||||
|
||||
def clone_git_repo(version, repo_url, destination_path):
|
||||
try:
|
||||
@@ -121,18 +128,7 @@ sources += find_end_files("./gpu/append_attn/template_instantiation", ".cu")
|
||||
|
||||
cutlass_dir = "third_party/cutlass"
|
||||
nvcc_compile_args = gencode_flags
|
||||
|
||||
if not os.path.exists(cutlass_dir) or not os.listdir(cutlass_dir):
|
||||
if not os.path.exists(cutlass_dir):
|
||||
os.makedirs(cutlass_dir)
|
||||
clone_git_repo("v3.5.0", "https://github.com/NVIDIA/cutlass.git", cutlass_dir)
|
||||
|
||||
json_dir = "third_party/nlohmann_json"
|
||||
if not os.path.exists(json_dir) or not os.listdir(json_dir):
|
||||
if not os.path.exists(json_dir):
|
||||
os.makedirs(json_dir)
|
||||
clone_git_repo("v3.11.3", "https://github.com/nlohmann/json.git", json_dir)
|
||||
|
||||
update_git_submodule()
|
||||
nvcc_compile_args += [
|
||||
"-O3",
|
||||
"-U__CUDA_NO_HALF_OPERATORS__",
|
||||
|
||||
1
csrc/third_party/cutlass
vendored
Submodule
1
csrc/third_party/cutlass
vendored
Submodule
Submodule csrc/third_party/cutlass added at 7d49e6c7e2
1
csrc/third_party/nlohmann_json
vendored
Submodule
1
csrc/third_party/nlohmann_json
vendored
Submodule
Submodule csrc/third_party/nlohmann_json added at 9cca280a4d
Reference in New Issue
Block a user