Skip to content

Commit 24fd843

Browse files
ljk53facebook-github-bot
authored andcommitted
[pytorch] fix ConstRefCType usage in codegen/api/native.py (#50742)
Summary: Pull Request resolved: #50742 Fixed the other usage of `BaseCType('const ...&)` on #49138. Checked byte-for-byte compatibility of the codegen output. Test Plan: Imported from OSS Reviewed By: ezyang Differential Revision: D25955565 Pulled By: ljk53 fbshipit-source-id: 83ebd6b039892b805444867ed97a6e2fa6e72225
1 parent 44922f2 commit 24fd843

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/codegen/api/native.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def argumenttype_type(t: Type, *, mutable: bool, binds: ArgName) -> CType:
3737
else:
3838
return ConstRefCType(tensor_type)
3939
elif str(t) == 'Tensor?[]':
40-
return BaseCType('const c10::List<c10::optional<Tensor>> &', binds)
40+
return ConstRefCType(BaseCType("c10::List<c10::optional<Tensor>>", binds))
4141
return cpp.argumenttype_type(t, mutable=mutable, binds=binds)
4242

4343
def returns_type(rs: Sequence[Return]) -> str:

0 commit comments

Comments
 (0)