Skip to content

Commit

Permalink
fix none type check
Browse files Browse the repository at this point in the history
  • Loading branch information
rsuderman committed Nov 1, 2024
1 parent 712d87f commit 7dcdd6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Conversion/TorchToTMTensor/TorchToTMTensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,7 @@ class ConvertAtenScaledDotProductAttentionOp
}

// Broadcast the batch dimensions of the mask:
if (mask) {
if (!isa<Torch::NoneType>(mask.getType())) {
auto maskTy = cast<RankedTensorType>(mask.getType());
int64_t rank = maskTy.getRank();
bool needsBroadcast = false;
Expand Down

0 comments on commit 7dcdd6d

Please sign in to comment.