As what I asked, I see there are some rules for defining functions in native_functions.yaml
:
- func: func_name[.overload_name](ArgType arg0[=default], ArgType arg1[=default], ...) -> Return
I read this, but it didn’t explain the overload_name
’s meaning.
For example:
- func: bernoulli_.float(Tensor(a!) self, float p=0.5, *, Generator? generator=None) -> Tensor(a!)
I think it means overloading implementation for t.bernoulli()
wehn t
’s dtype
is float
. But for:
- func: bernoulli_.Tensor(Tensor(a!) self, Tensor p, *, Generator? generator=None) -> Tensor(a!)
What does this mean? I can’t understand. Glad for your help or docs.