• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #pragma once
2 
3 #include <c10/core/TensorOptions.h>
4 
5 namespace at {
6 
7 // Represents the initial TensorOptions, before the "defaults" are ever changed.
8 // This is designed to be used in library code, where the explicit devices,
9 // dtypes, etc. are known. NOTE: this is not a stable API.
initialTensorOptions()10 inline TensorOptions initialTensorOptions() {
11   return TensorOptions(kCPU).dtype(kFloat).layout(kStrided).requires_grad(
12       false);
13 }
14 
15 } // namespace at
16