Skip to content

New rule: use dtype instead of converting after creation #58

Open
@kit1980

Description

@kit1980

For many ops dtype parameter can be provided, and it should be preferred (from readability and performance point of views) to use it instead of converting the op results to a different type.

For example, torch.arange(1, N).float() should be changed to torch.arange(1, N, dtype=torch.float32)

cc @malfet

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions