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
gaoqiong
flash-attention
Commits
dfc60f6b
Unverified
Commit
dfc60f6b
authored
Jul 20, 2023
by
Ikko Eltociear Ashimine
Committed by
GitHub
Jul 20, 2023
Browse files
[LayerNorm] Fix typo in ln_api.cpp
unintialized -> uninitialized
parent
31ae2488
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
csrc/layer_norm/ln_api.cpp
csrc/layer_norm/ln_api.cpp
+2
-2
No files found.
csrc/layer_norm/ln_api.cpp
View file @
dfc60f6b
...
...
@@ -132,7 +132,7 @@ std::vector<at::Tensor> dropout_add_ln_fwd(const at::Tensor &x0, // Input:
TORCH_CHECK
(
x0
.
is_contiguous
());
// c10::IntArrayRef does not own the storage, so we need to construct a vector.
// Otherwise just constructing IntArrayRef({blah}) will cause unintialized memory because
// Otherwise just constructing IntArrayRef({blah}) will cause unin
i
tialized memory because
// blah is then deallocated.
std
::
vector
<
int64_t
>
sizes_vec
{
!
x0_subset_
.
has_value
()
?
x0
.
size
(
0
)
:
x0_subset_
.
value
().
size
(
0
),
x0
.
size
(
1
)};
auto
sizes
=
c10
::
IntArrayRef
(
sizes_vec
);
...
...
@@ -331,7 +331,7 @@ std::vector<at::Tensor> dropout_add_ln_bwd(const at::Tensor &dz, // BxSxhidd
TORCH_CHECK
(
hidden_size
==
cols
);
// c10::IntArrayRef does not own the storage, so we need to construct a vector.
// Otherwise just constructing IntArrayRef({blah}) will cause unintialized memory because
// Otherwise just constructing IntArrayRef({blah}) will cause unin
i
tialized memory because
// blah is then deallocated.
std
::
vector
<
int64_t
>
x0_sizes_vec
{
!
x0_subset_
.
has_value
()
?
rows
:
x0_numrows
,
cols
};
auto
x0_sizes
=
c10
::
IntArrayRef
(
x0_sizes_vec
);
...
...
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