MCPcopy
hub / github.com/lutzroeder/netron / emitSlice

Method emitSlice

source/python.js:17933–17947  ·  view source on GitHub ↗
(loc, input, dim, slice)

Source from the content-addressed store, hash-verified

17931 return this.emitBuiltinCall(loc, this.graph, 'aten::slice', args, []);
17932 }
17933 emitSlice(loc, input, dim, slice) {
17934 let start = null;
17935 let end = null;
17936 let step = null;
17937 if (slice.lower) {
17938 start = this.emitExpr(slice.lower);
17939 }
17940 if (slice.upper) {
17941 end = this.emitExpr(slice.upper);
17942 }
17943 if (slice.step) {
17944 step = this.emitExpr(slice.step);
17945 }
17946 return this.emitSliceOp(loc, input, dim, start, end, step);
17947 }
17948 emitBasicSlice(loc, sliceable, subscript_exprs) {
17949 torch._C.AT_ASSERT(subscript_exprs instanceof ast.Slice);
17950 const slice_exp = subscript_exprs;

Callers 1

emitBasicSliceMethod · 0.80

Calls 2

emitExprMethod · 0.80
emitSliceOpMethod · 0.80

Tested by

no test coverage detected