Skip to content

Commit a60f55a

Browse files
[JAX] Limit max logit attr to forward (#3428)
Limit JAX max logit attr to forward Signed-off-by: Kshitij Lakhani <klakhani@nvidia.com> Co-authored-by: jberchtold-nvidia <158520091+jberchtold-nvidia@users.noreply.github.com>
1 parent 5ace9a3 commit a60f55a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎transformer_engine/jax/csrc/extensions/attention.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ static void FusedAttnForwardImpl(
399399
NVTE_QKV_Layout qkv_layout = \
400400
static_cast<NVTE_QKV_Layout>(get_attr_value<int64_t>(attrs, "qkv_layout")); \
401401
bool is_training = get_attr_value<bool>(attrs, "is_training"); \
402-
bool return_max_logit = get_attr_value_or_default<bool>(attrs, "return_max_logit", false); \
403402
bool deterministic = get_attr_value<bool>(attrs, "deterministic"); \
404403
auto is_ragged = nvte_get_qkv_format(qkv_layout) == NVTE_QKV_Format::NVTE_THD; \
405404
size_t wkspace_size = product(workspace_buf->dimensions()); \
@@ -416,6 +415,7 @@ Error_Type FusedAttnForwardFFI(cudaStream_t stream, Buffer_Type q_buf, Buffer_Ty
416415
Result_Type rng_state_buf, Result_Type workspace_buf,
417416
Dictionary attrs) {
418417
FUSED_ATTN_FFI_GET_ATTRS;
418+
bool return_max_logit = get_attr_value_or_default<bool>(attrs, "return_max_logit", false);
419419

420420
FusedAttnForwardImpl(
421421
stream, q_buf.untyped_data(), k_buf.untyped_data(), v_buf.untyped_data(),

0 commit comments

Comments
 (0)