3 #include <ATen/core/functional.h> 4 #include <torch/csrc/WindowsTorchApiMacro.h> 5 #include <torch/csrc/jit/fuser/tensor_desc.h> 6 #include <torch/csrc/utils/hash.h> 22 : descs_{c10::fmap<TensorDesc>(inputs)},
23 hash_code_{torch::get_hash(_device, inputs.
size(), descs_)},
27 static size_t hash(
const ArgSpec& spec) {
28 return spec.hash_code_;
32 bool operator==(
const ArgSpec& other)
const {
33 return (descs_ == other.descs_ && device_ == other.device_);
36 bool operator!=(
const ArgSpec& spec)
const {
37 return !(*
this == spec);
41 size_t hashCode()
const {
44 const std::vector<TensorDesc>& descs()
const {
52 std::vector<TensorDesc> descs_;
constexpr size_t size() const
size - Get the array size.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...