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
8754fa25
"website/git@developer.sourcefind.cn:tsoc/superbenchmark.git" did not exist on "694ae2a7c687a0fb12dc09a4216a04347ceb6d1d"
Commit
8754fa25
authored
Dec 12, 2022
by
oahzxl
Browse files
change threshold
parent
98f9728e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
chunk_codegen_run.py
chunk_codegen_run.py
+3
-2
No files found.
chunk_codegen_run.py
View file @
8754fa25
...
...
@@ -45,8 +45,9 @@ def _test_fwd_and_bwd(model: torch.nn.Module, gm: ColoGraphModule, node, pair):
with
torch
.
no_grad
():
non_fx_out
=
model
(
node
,
pair
)
fx_out
=
gm
(
node
,
pair
)
assert
torch
.
allclose
(
non_fx_out
[
0
],
fx_out
[
0
],
atol
=
1e-6
),
"fx_out doesn't comply with original output"
assert
torch
.
allclose
(
non_fx_out
[
1
],
fx_out
[
1
],
atol
=
1e-6
),
"fx_out doesn't comply with original output"
assert
torch
.
allclose
(
non_fx_out
[
0
],
fx_out
[
0
],
atol
=
1e-4
),
"fx_out doesn't comply with original output"
assert
torch
.
allclose
(
non_fx_out
[
1
],
fx_out
[
1
],
atol
=
1e-4
),
"fx_out doesn't comply with original output"
# test barckward
# loss0 = non_fx_out[0].sum() + non_fx_out[1].sum()
...
...
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