Skip to content

Allow double in native_functions.yaml as a schema type #163659

@janeyx99

Description

@janeyx99

🚀 The feature, motivation and pitch

Today, our schemas say "float" but that is a lie!! Internally we pass around doubles. I'm okay with this though.

My ask: can we allow schemas to say "double", so for user custom ops they can put "double" in the schema and double in their custom kernels and be less confused?

Today, custom ops writers have double in their kernels but put float in the schema cuz they have to.

Triggered from https://github.com/pytorch/pytorch/pull/163505/files#r2372832280

Alternatives

No response

Additional context

No response

cc @malfet @zou3519 @anjali411 @chauhang @penguinwu @bdhirsh @ezyang

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: cpp-extensionsRelated to torch.utils.cpp_extensionmodule: dispatchDispatchStub, Type, void pointer table, c10 dispatchmodule: libraryRelated to torch.library (for registering ops from Python)module: pt2-dispatcherPT2 dispatcher-related issues (e.g., aotdispatch, functionalization, faketensor, custom-op,oncall: pt2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions