-
Notifications
You must be signed in to change notification settings - Fork 27.4k
caffe2/aten bridge doesn't handle overloads with ambiguous defaulting #43945
Copy link
Copy link
Closed
Labels
caffe2module: codegenIssues related to the codegen for Aten and AutogradIssues related to the codegen for Aten and Autogradmodule: internalsRelated to internal abstractions in c10 and ATenRelated to internal abstractions in c10 and ATentriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
The bridge infra generated by gen_op.py isn't designed to handle calls to multiple op overloads whose defaulting may produce ambiguous calls. For example, the two overloads
- func: ambig.a(Tensor self, int? i=0) -> Tensor
- func: ambig.b(Tensor self, bool? b=False) -> Tensor
will produce (among others) a binding that contains the C++ call ambig(self), resulting in a C++ compiler error.
This can prevent intuitive overloading schemes from working (see e.g. #42190). It should be possible to disambiguate by supplying default arguments explicitly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
caffe2module: codegenIssues related to the codegen for Aten and AutogradIssues related to the codegen for Aten and Autogradmodule: internalsRelated to internal abstractions in c10 and ATenRelated to internal abstractions in c10 and ATentriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module