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
b1553fdf
Unverified
Commit
b1553fdf
authored
Aug 15, 2022
by
Jiarui Fang
Committed by
GitHub
Aug 15, 2022
Browse files
[NFC] global vars should be upper case (#1456)
parent
367c6158
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
colossalai/fx/codegen/activation_checkpoint_codegen.py
colossalai/fx/codegen/activation_checkpoint_codegen.py
+4
-4
No files found.
colossalai/fx/codegen/activation_checkpoint_codegen.py
View file @
b1553fdf
...
...
@@ -4,13 +4,13 @@ from typing import List, Callable, Any, Tuple, Dict
try
:
from
torch.fx.node
import
Node
,
Argument
,
map_arg
,
_type_repr
,
_get_qualified_name
from
torch.fx.graph
import
_Namespace
,
PythonCode
,
_custom_builtins
,
_is_from_torch
,
_format_target
,
magic_methods
,
CodeGen
,
_origin_type_map
,
inplace_methods
codegen_available
=
True
CODEGEN_AVAILABLE
=
True
except
:
from
torch.fx.graph
import
_Namespace
,
PythonCode
,
_custom_builtins
,
_is_from_torch
,
_format_target
,
magic_methods
,
_origin_type_map
,
_format_args
from
torch.fx.node
import
Node
,
Argument
,
map_arg
,
_type_repr
,
_get_qualified_name
codegen_available
=
False
CODEGEN_AVAILABLE
=
False
if
codegen_available
:
if
CODEGEN_AVAILABLE
:
__all__
=
[
'ActivationCheckpointCodeGen'
]
else
:
__all__
=
[
'python_code_with_activation_checkpoint'
]
...
...
@@ -169,7 +169,7 @@ def emit_code_with_activation_checkpoint(body, nodes, emit_node_func, delete_unu
within_ckpt_region
=
False
if
codegen_available
:
if
CODEGEN_AVAILABLE
:
class
ActivationCheckpointCodeGen
(
CodeGen
):
...
...
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