"vscode:/vscode.git/clone" did not exist on "cf95cfc07cbc302d38ea6409eab8146f10cf200b"
Unverified Commit a3cf9951 authored by Krzysztof Drewniak's avatar Krzysztof Drewniak Committed by GitHub
Browse files

[mlir] Add assertion to prevent sending MLIR dynamic shapes (#2299)

parent 94fcfc02
...@@ -320,7 +320,10 @@ struct mlir_program ...@@ -320,7 +320,10 @@ struct mlir_program
MlirType make_tensor(const shape& s) const MlirType make_tensor(const shape& s) const
{ {
assert(s.standard()); if(not s.standard())
MIGRAPHX_THROW("MLIR expects all tensors to be in standard shape");
if(s.dynamic())
MIGRAPHX_THROW("MLIR does not support dynamic shapes");
std::vector<int64_t> lens(s.lens().begin(), s.lens().end()); std::vector<int64_t> lens(s.lens().begin(), s.lens().end());
return mlirRankedTensorTypeGet( return mlirRankedTensorTypeGet(
lens.size(), lens.data(), make_type(s.type()), mlirAttributeGetNull()); lens.size(), lens.data(), make_type(s.type()), mlirAttributeGetNull());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment