diff --git a/mlir/include/mlir/ExecutionEngine/SparseTensor/File.h b/mlir/include/mlir/ExecutionEngine/SparseTensor/File.h --- a/mlir/include/mlir/ExecutionEngine/SparseTensor/File.h +++ b/mlir/include/mlir/ExecutionEngine/SparseTensor/File.h @@ -44,7 +44,7 @@ /// as well as providing the buffers and methods for parsing those headers. class SparseTensorFile final { public: - enum class ValueKind { + enum class ValueKind : uint8_t { // The value before calling `readHeader`. kInvalid = 0, // Values that can be set by `readMMEHeader`. diff --git a/mlir/lib/ExecutionEngine/SparseTensor/File.cpp b/mlir/lib/ExecutionEngine/SparseTensor/File.cpp --- a/mlir/lib/ExecutionEngine/SparseTensor/File.cpp +++ b/mlir/lib/ExecutionEngine/SparseTensor/File.cpp @@ -107,6 +107,9 @@ // So we allow implicitly converting the stored values to both // integer and floating primary-types. return isRealPrimaryType(valTy); + default: + MLIR_SPARSETENSOR_FATAL("Unknown ValueKind: %d\n", + static_cast(valueKind_)); } }