Home / Class/ type_from_firstarg Class — pytorch Architecture

type_from_firstarg Class — pytorch Architecture

Architecture documentation for the type_from_firstarg class in autocast_mode.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/autocast_mode.h lines 405–412

template <typename... Args>
inline at::ScalarType type_from_firstarg(
    c10::DeviceType device_type,
    at::ScalarType to_type,
    const Tensor& arg,
    Args... args) {
  return (is_eligible(arg, device_type) ? to_type : arg.scalar_type());
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free