SequenceNumber.h 587 B

123456789101112131415161718
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #include <c10/macros/Export.h>
  4. #include <cstdint>
  5. // A simple thread local enumeration, used to link forward and backward pass
  6. // ops and is used by autograd and observers framework
  7. namespace at::sequence_number {
  8. TORCH_API uint64_t peek();
  9. TORCH_API uint64_t get_and_increment();
  10. } // namespace at::sequence_number
  11. #else
  12. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  13. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)