Skip to content

c10::scalar_to_tensor(...) uses should be audited for performance and type promotion impact #49758

@mruberry

Description

@mruberry

See, for example:

native::pow_out(result, c10::scalar_to_tensor(base, exp.device()), exp);

There are several other cases, too, and the pattern is, in general, an antipattern. This may affect type promotion and (see below) impacts performance.

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @ngimel @VitalyFedyunin

Metadata

Metadata

Assignees

Labels

high prioritymodule: cudaRelated to torch.cuda, and CUDA support in generalmodule: performanceIssues related to performance, either of kernel code or framework gluetriagedThis 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