| 1903 | } |
| 1904 | |
| 1905 | ParseResult GetIndexSpaceShapeOp::parse(OpAsmParser &parser, |
| 1906 | OperationState &result) { |
| 1907 | OpAsmParser::UnresolvedOperand src; |
| 1908 | if (parser.parseOperand(src) || parser.parseColon()) |
| 1909 | return failure(); |
| 1910 | |
| 1911 | Type resultType; |
| 1912 | Type srcType; |
| 1913 | SMLoc srcTypeLoc = parser.getCurrentLocation(); |
| 1914 | if (parseCudaTileType(parser, srcType) || parser.parseArrow() || |
| 1915 | parseCudaTileType(parser, resultType)) |
| 1916 | return failure(); |
| 1917 | |
| 1918 | TileView srcTensorViewType = llvm::dyn_cast<TileView>(srcType); |
| 1919 | if (!srcTensorViewType) |
| 1920 | return parser.emitError(srcTypeLoc, "expected tile view, got ") << srcType; |
| 1921 | |
| 1922 | if (failed(parser.resolveOperand(src, srcType, result.operands))) |
| 1923 | return failure(); |
| 1924 | |
| 1925 | size_t rank = srcTensorViewType.getViewIndexRank(); |
| 1926 | for (size_t i = 0; i < rank; i++) |
| 1927 | result.addTypes(resultType); |
| 1928 | |
| 1929 | return success(); |
| 1930 | } |
| 1931 | |
| 1932 | //===----------------------------------------------------------------------===// |
| 1933 | // GetTensorShapeOp |
nothing calls this directly
no test coverage detected