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
Uni-Core
Commits
b0f52120
Commit
b0f52120
authored
Aug 04, 2022
by
Guolin Ke
Browse files
remove the limit of softmax elements
parent
6c18b2ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
csrc/softmax_dropout/softmax_fast.h
csrc/softmax_dropout/softmax_fast.h
+0
-2
No files found.
csrc/softmax_dropout/softmax_fast.h
View file @
b0f52120
...
@@ -444,7 +444,6 @@ template <typename input_t, typename output_t, typename acc_t, bool NeedMask, bo
...
@@ -444,7 +444,6 @@ template <typename input_t, typename output_t, typename acc_t, bool NeedMask, bo
bool
dispatch_softmax_forward
(
output_t
*
dst
,
output_t
*
dst_orig
,
const
input_t
*
src
,
const
input_t
*
attn_mask
,
const
input_t
*
bias
,
void
*
mask
,
acc_t
p
,
bool
dispatch_softmax_forward
(
output_t
*
dst
,
output_t
*
dst_orig
,
const
input_t
*
src
,
const
input_t
*
attn_mask
,
const
input_t
*
bias
,
void
*
mask
,
acc_t
p
,
int
softmax_elements
,
int64_t
batch_count
,
int64_t
attn_inner_skip_batch
,
int64_t
bias_batch_count
,
uint64_t
seed
,
uint64_t
offset
)
int
softmax_elements
,
int64_t
batch_count
,
int64_t
attn_inner_skip_batch
,
int64_t
bias_batch_count
,
uint64_t
seed
,
uint64_t
offset
)
{
{
TORCH_INTERNAL_ASSERT
(
softmax_elements
>=
0
&&
softmax_elements
<=
2048
);
if
(
softmax_elements
==
0
)
if
(
softmax_elements
==
0
)
{
{
return
false
;
return
false
;
...
@@ -677,7 +676,6 @@ template <typename input_t, typename output_t, typename acc_t, bool IsLogSoftmax
...
@@ -677,7 +676,6 @@ template <typename input_t, typename output_t, typename acc_t, bool IsLogSoftmax
void
dispatch_softmax_backward
(
output_t
*
grad_input
,
const
input_t
*
grad
,
const
input_t
*
output
,
void
dispatch_softmax_backward
(
output_t
*
grad_input
,
const
input_t
*
grad
,
const
input_t
*
output
,
const
void
*
mask
,
acc_t
p
,
int
softmax_elements
,
int64_t
batch_count
)
const
void
*
mask
,
acc_t
p
,
int
softmax_elements
,
int64_t
batch_count
)
{
{
TORCH_INTERNAL_ASSERT
(
softmax_elements
>=
0
&&
softmax_elements
<=
2048
);
if
(
softmax_elements
==
0
)
if
(
softmax_elements
==
0
)
{
{
return
;
return
;
...
...
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