aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorSarthak Gupta <sarthakgpt95@gmail.com>2023-10-23 14:15:03 +0530
committerGitHub <noreply@github.com>2023-10-23 09:45:03 +0100
commit3651f377f632d9152f2bd8fc2f9302ec9f9bdd5e (patch)
treee61b04fa63ed1118ef7d4a5680cded445b606e88 /clang/lib/Basic/SourceManager.cpp
parent5b189d6f5606b051667b363f7430a7b990afab34 (diff)
downloadllvm-3651f377f632d9152f2bd8fc2f9302ec9f9bdd5e.zip
llvm-3651f377f632d9152f2bd8fc2f9302ec9f9bdd5e.tar.gz
llvm-3651f377f632d9152f2bd8fc2f9302ec9f9bdd5e.tar.bz2
[mlir][tosa] Check for unranked tensors during validation (#68509)
Fixes https://github.com/llvm/llvm-project/issues/67760 `levelCheckRank` ensures that the tensors for tosa operations are not unranked During tosa validation in `levelCheckRank`, we were trying to get the rank of a tensor without checking if it is ranked or unranked, which leads to an `assert` error. I see two ways to fix this: - Only check `type.getRank() > tosa_level.MAX_RANK` if the tensor is ranked, and then proceed as usual. (like `if (type.hasRank() && type.getRank() > tosa_level.MAX_RANK)` , OR - Throw an error for unranked tensors as result.
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions