mirror of https://github.com/llvm/torch-mlir
Address missing default label in switch statement
Signed-off-by: Bairen Yi <yibairen.byron@bytedance.com>pull/184/head
parent
5315598947
commit
5fed296904
|
@ -8,6 +8,8 @@
|
|||
|
||||
#include "npcomp/RefBackend/Runtime/UserAPI.h"
|
||||
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
|
@ -119,6 +121,7 @@ std::int32_t refbackrt::getElementTypeByteSize(ElementType type) {
|
|||
case ElementType::F32:
|
||||
return 4;
|
||||
}
|
||||
llvm_unreachable("unsupported dtype");
|
||||
}
|
||||
|
||||
Ref<Tensor> Tensor::create(ArrayRef<std::int32_t> extents, ElementType type,
|
||||
|
|
|
@ -80,6 +80,7 @@ static Type convertToMLIRType(refbackrt::ElementType type, Builder &builder) {
|
|||
case refbackrt::ElementType::F32:
|
||||
return builder.getF32Type();
|
||||
}
|
||||
llvm_unreachable("unsupported dtype");
|
||||
}
|
||||
|
||||
static RankedTensorType getCorrespondingMLIRTensorType(refbackrt::Tensor &tensor,
|
||||
|
@ -103,6 +104,7 @@ static Attribute convertToMLIRAttribute(refbackrt::Tensor &tensor,
|
|||
return DenseFPElementsAttr::get(type, values);
|
||||
}
|
||||
}
|
||||
llvm_unreachable("unsupported dtype");
|
||||
}
|
||||
|
||||
static void printOutput(refbackrt::Tensor &tensor, llvm::raw_ostream &os) {
|
||||
|
|
Loading…
Reference in New Issue