Skip to content

Commit 33a15d4

Browse files
committed
Update on "Remove codegen for IntArrayRefStride, which isn't used."
Differential Revision: [D21476008](https://our.internmc.facebook.com/intern/diff/D21476008) [ghstack-poisoned]
2 parents 50557e0 + 5eeadbb commit 33a15d4

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

aten/src/ATen/function_wrapper.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,6 @@ def TypedDict(name, attrs, total=True): # type: ignore
196196
CAFFE2_API ${return_type} ${native_type_method_dispatch}(${formals_with_defaults});
197197
""")
198198

199-
CONDITIONAL_INITIALIZER = CodeTemplate("""\
200-
if (${name}.defined()) {
201-
${initializer}
202-
}""")
203-
204199
CALL_TEMPLATE = CodeTemplate("${cname}(${actuals})")
205200

206201
OPERATOR_NAME = CodeTemplate("aten::${operator_name}")
@@ -1410,17 +1405,6 @@ def emit_body(env, option, scalar_type_cases):
14101405
case_body.append("auto {}_ = {};".format(
14111406
arg['name'], check_cast))
14121407

1413-
initializers = []
1414-
1415-
# only initialize non-null arguments
1416-
if nullable_argument(arg) and len(initializers) > 0:
1417-
case_body.append(CONDITIONAL_INITIALIZER.substitute({
1418-
'name': arg['name'],
1419-
'initializer': initializers
1420-
}))
1421-
else:
1422-
case_body += initializers
1423-
14241408
# cimpls, if it exists, contains the underlying C function names and
14251409
# arguments. Otherwise use option
14261410
cimpls = option.get('cimpls', [option])

0 commit comments

Comments
 (0)