17 namespace torch {
namespace autograd {
25 : version_block_(std::make_shared<std::atomic<uint32_t>>(version)) {}
27 void bump() noexcept {
28 version_block_->fetch_add(1);
31 uint32_t current_version()
const noexcept {
32 return version_block_->load();
36 std::shared_ptr<std::atomic<uint32_t>> version_block_;