MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / parse

Method parse

lib/Dialect/CudaTile/IR/CudaTile.cpp:1905–1930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1903}
1904
1905ParseResult 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

Callers

nothing calls this directly

Calls 9

parseIndexTypesFunction · 0.85
parseMemoryAttributesFunction · 0.85
parseViewTkoCommonFunction · 0.85
finalizeViewTkoParseFunction · 0.85
maxFunction · 0.85
emitErrorMethod · 0.80
getViewIndexRankMethod · 0.80
sizeMethod · 0.80
parseRegionMethod · 0.80

Tested by

no test coverage detected