Update cross_entropy_loss.py
This commit is contained in:
parent
dd5d035a99
commit
f3bd5d6d33
1 changed files with 7 additions and 7 deletions
|
|
@ -30,8 +30,8 @@ def _cross_entropy_forward(
|
|||
loss_ptr ,
|
||||
logsumexp_ptr ,
|
||||
labels_ptr ,
|
||||
VOCAB_SIZE : tl.constexpr,
|
||||
BLOCK_SIZE : tl.constexpr,
|
||||
VOCAB_SIZE : tl.constexpr(tl.int32),
|
||||
BLOCK_SIZE : tl.constexpr(tl.int32),
|
||||
DO_SOFTCAPPING : tl.constexpr(tl.int1),
|
||||
SOFTCAP : tl.constexpr(tl.float32),
|
||||
DO_LOGIT_SCALING : tl.constexpr(tl.int1),
|
||||
|
|
@ -103,9 +103,9 @@ def _chunked_cross_entropy_forward(
|
|||
loss_ptr ,
|
||||
logsumexp_ptr ,
|
||||
labels_ptr ,
|
||||
VOCAB_SIZE ,
|
||||
N_CHUNKS ,
|
||||
BLOCK_SIZE : tl.constexpr,
|
||||
VOCAB_SIZE : tl.constexpr(tl.int32),
|
||||
N_CHUNKS : tl.constexpr(tl.int32),
|
||||
BLOCK_SIZE : tl.constexpr(tl.int32),
|
||||
DO_SOFTCAPPING : tl.constexpr(tl.int1),
|
||||
SOFTCAP : tl.constexpr(tl.float32),
|
||||
DO_LOGIT_SCALING : tl.constexpr(tl.int1),
|
||||
|
|
@ -187,8 +187,8 @@ def _cross_entropy_backward(
|
|||
dloss_row_stride ,
|
||||
logsumexp_ptr ,
|
||||
labels_ptr ,
|
||||
VOCAB_SIZE ,
|
||||
BLOCK_SIZE : tl.constexpr,
|
||||
VOCAB_SIZE : tl.constexpr(tl.int32),
|
||||
BLOCK_SIZE : tl.constexpr(tl.int32),
|
||||
DO_SOFTCAPPING : tl.constexpr(tl.int1),
|
||||
SOFTCAP : tl.constexpr(tl.float32),
|
||||
DO_LOGIT_SCALING : tl.constexpr(tl.int1),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue