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
f3802d6b
Unverified
Commit
f3802d6b
authored
Jan 18, 2022
by
Frank Lee
Committed by
GitHub
Jan 18, 2022
Browse files
fixed jit default setting (#154)
parent
a1da3900
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
colossalai/kernel/jit/__init__.py
colossalai/kernel/jit/__init__.py
+2
-2
colossalai/kernel/jit/option.py
colossalai/kernel/jit/option.py
+5
-2
No files found.
colossalai/kernel/jit/__init__.py
View file @
f3802d6b
from
.option
import
_
set_jit_fusion_options
from
.option
import
set_jit_fusion_options
from
.bias_dropout_add
import
bias_dropout_add_fused_train
,
bias_dropout_add_fused_inference
from
.bias_dropout_add
import
bias_dropout_add_fused_train
,
bias_dropout_add_fused_inference
from
.bias_gelu
import
bias_gelu_impl
from
.bias_gelu
import
bias_gelu_impl
_set_jit_fusion_options
()
__all__
=
[
__all__
=
[
"bias_dropout_add_fused_train"
,
"bias_dropout_add_fused_inference"
,
"bias_gelu_impl"
,
"bias_dropout_add_fused_train"
,
"bias_dropout_add_fused_inference"
,
"bias_gelu_impl"
,
"set_jit_fusion_options"
]
]
colossalai/kernel/jit/option.py
View file @
f3802d6b
...
@@ -3,8 +3,11 @@ import torch
...
@@ -3,8 +3,11 @@ import torch
JIT_OPTIONS_SET
=
False
JIT_OPTIONS_SET
=
False
def
_set_jit_fusion_options
():
def
set_jit_fusion_options
():
"""Set PyTorch JIT layer fusion options."""
"""Set PyTorch JIT layer fusion options.
"""
# LSG: the latest pytorch and CUDA versions may not support
# the following jit settings
global
JIT_OPTIONS_SET
global
JIT_OPTIONS_SET
if
JIT_OPTIONS_SET
==
False
:
if
JIT_OPTIONS_SET
==
False
:
# flags required to enable jit fusion kernels
# flags required to enable jit fusion kernels
...
...
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