Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
4e4a10c9
Unverified
Commit
4e4a10c9
authored
Oct 27, 2023
by
アマデウス
Committed by
GitHub
Oct 27, 2023
Browse files
updated c++17 compiler flags (#4983)
parent
1db67276
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
3 deletions
+15
-3
examples/community/roberta/preprocessing/Makefile
examples/community/roberta/preprocessing/Makefile
+1
-1
op_builder/cpu_adam.py
op_builder/cpu_adam.py
+11
-1
op_builder/gptq.py
op_builder/gptq.py
+1
-1
op_builder/multi_head_attn.py
op_builder/multi_head_attn.py
+1
-0
op_builder/scaled_masked_softmax.py
op_builder/scaled_masked_softmax.py
+1
-0
No files found.
examples/community/roberta/preprocessing/Makefile
View file @
4e4a10c9
CXXFLAGS
+=
-O3
-Wall
-shared
-std
=
c++14
-fPIC
-fdiagnostics-color
CXXFLAGS
+=
-O3
-Wall
-shared
-std
=
c++14
-std
=
c++17
-fPIC
-fdiagnostics-color
CPPFLAGS
+=
$(
shell
python3
-m
pybind11
--includes
)
LIBNAME
=
mask
LIBEXT
=
$(
shell
python3-config
--extension-suffix
)
...
...
op_builder/cpu_adam.py
View file @
4e4a10c9
...
...
@@ -21,12 +21,22 @@ class CPUAdamBuilder(Builder):
return
[
self
.
csrc_abs_path
(
"includes"
),
self
.
get_cuda_home_include
()]
def
cxx_flags
(
self
):
extra_cxx_flags
=
[
"-std=c++14"
,
"-lcudart"
,
"-lcublas"
,
"-g"
,
"-Wno-reorder"
,
"-fopenmp"
,
"-march=native"
]
extra_cxx_flags
=
[
"-std=c++14"
,
"-std=c++17"
,
"-lcudart"
,
"-lcublas"
,
"-g"
,
"-Wno-reorder"
,
"-fopenmp"
,
"-march=native"
,
]
return
[
"-O3"
]
+
self
.
version_dependent_macros
+
extra_cxx_flags
def
nvcc_flags
(
self
):
extra_cuda_flags
=
[
"-std=c++14"
,
"-std=c++17"
,
"-U__CUDA_NO_HALF_OPERATORS__"
,
"-U__CUDA_NO_HALF_CONVERSIONS__"
,
"-U__CUDA_NO_HALF2_OPERATORS__"
,
...
...
op_builder/gptq.py
View file @
4e4a10c9
...
...
@@ -37,12 +37,12 @@ class GPTQBuilder(Builder):
extra_cuda_flags
=
[
"-v"
,
"-std=c++14"
,
"-std=c++17"
,
"-U__CUDA_NO_HALF_OPERATORS__"
,
"-U__CUDA_NO_HALF_CONVERSIONS__"
,
"-U__CUDA_NO_HALF2_OPERATORS__"
,
"-DTHRUST_IGNORE_CUB_VERSION_CHECK"
,
"-lcublas"
,
"-std=c++17"
,
]
for
arch
in
torch
.
cuda
.
get_arch_list
():
...
...
op_builder/multi_head_attn.py
View file @
4e4a10c9
...
...
@@ -35,6 +35,7 @@ class MultiHeadAttnBuilder(Builder):
def
nvcc_flags
(
self
):
extra_cuda_flags
=
[
"-std=c++14"
,
"-std=c++17"
,
"-U__CUDA_NO_HALF_OPERATORS__"
,
"-U__CUDA_NO_HALF_CONVERSIONS__"
,
"-U__CUDA_NO_HALF2_OPERATORS__"
,
...
...
op_builder/scaled_masked_softmax.py
View file @
4e4a10c9
...
...
@@ -25,6 +25,7 @@ class ScaledMaskedSoftmaxBuilder(Builder):
def
nvcc_flags
(
self
):
extra_cuda_flags
=
[
"-std=c++14"
,
"-std=c++17"
,
"-U__CUDA_NO_HALF_OPERATORS__"
,
"-U__CUDA_NO_HALF_CONVERSIONS__"
,
"-U__CUDA_NO_HALF2_OPERATORS__"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment