[all-commits] [llvm/llvm-project] a3e488: [mlir][sparse] Macros to clean up StridedMemRefTyp...
wren romano via All-commits
all-commits at lists.llvm.org
Wed Nov 16 16:40:29 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a3e4888350169d1f61b3de4df3b0960f865ca416
https://github.com/llvm/llvm-project/commit/a3e4888350169d1f61b3de4df3b0960f865ca416
Author: wren romano <2998727+wrengr at users.noreply.github.com>
Date: 2022-11-16 (Wed, 16 Nov 2022)
Changed paths:
M mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp
Log Message:
-----------
[mlir][sparse] Macros to clean up StridedMemRefType in the SparseTensorRuntime
In particular, this silences warnings from [-Wsign-compare].
This is a revised version of D137735, which got reverted due to a sign-comparison warning on LLVM's Windows buildbot (which was not on MLIR's Windows buildbot). Differences vs the previous differential:
* `vectorToMemref` now uses `detail::checkOverflowCast` to silence the warning that caused the the previous differential to get reverted.
* `MEMREF_GET_USIZE` now uses `detail::checkOverflowCast` rather than `static_cast`
* `ASSERT_USIZE_EQ` added to abbreviate another common idiom, and to ensure that we use `detail::safelyEQ` everywhere (to silence a few other warnings)
* A couple for-loops now use `index_type` for the induction variable, since their upper bound uses that typedef too. (Namely `_mlir_ciface_getSparseTensorReaderDimSizes` and `_mlir_ciface_outSparseTensorWriterNext`)
Depends on D138149
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D137998
More information about the All-commits
mailing list