Skip to content

Commit 2e0f502

Browse files
authored
Fix Bugs (#3902)
1 parent 92ae286 commit 2e0f502

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

core/lowering/register_trt_placeholder_ops.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ RegisterOperators trt_placeholder_ops_reg({
2020
[](Stack& stack) {
2121
auto attn_mask = pop(stack).to<at::Tensor>();
2222
if (attn_mask.scalar_type() == at::kBool) {
23-
attn_mask = attn_mask;
2423
attn_mask.masked_fill_(attn_mask.logical_not(), -std::numeric_limits<float>::infinity());
2524
}
2625
return attn_mask;

cpp/src/types.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ TensorFormat::TensorFormat(at::MemoryFormat t) {
158158
switch (t) {
159159
case at::MemoryFormat::ChannelsLast:
160160
value = TensorFormat::kChannelsLast;
161+
break;
161162
case at::MemoryFormat::Contiguous:
162163
default:
163164
value = TensorFormat::kContiguous;

0 commit comments

Comments
 (0)