Home / Class/ wrap_vector Class — pytorch Architecture

wrap_vector Class — pytorch Architecture

Architecture documentation for the wrap_vector class in qlinear_serialize.cpp from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/ao_sparse/quantized/cpu/qlinear_serialize.cpp lines 20–27

template <typename UNDERLYING_DTYPE, typename T>
at::Tensor wrap_vector(T& vec, c10::ScalarType dtype) {
  at::Tensor t = at::empty(
      {static_cast<long>(vec.size())}, at::device(c10::kCPU).dtype(dtype));
  std::copy(
      vec.data(), vec.data() + vec.size(), t.mutable_data_ptr<UNDERLYING_DTYPE>());
  return t;
}

Analyze Your Own Codebase

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

Try Supermodel Free