Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use atomic<int64_t> instead of atomic_int64_t. The later is available…
… in GCC7, but not GCC5 (#528) Summary: Pull Request resolved: #528 Since PyTorch CI builds for GCC5, we need to use std::atomic<std::int64_t> for iterationCount, because atomic_int64_t is not available until after GCC5. Test Plan: This fixes PyTorch CI error: https://app.circleci.com/pipelines/github/pytorch/pytorch/450702/workflows/e2f30e30-26d5-410d-8334-a2d6919d74de/jobs/16978938 ``` In file included from ../third_party/kineto/libkineto/src/ActivityProfilerController.cpp:3:0: ../third_party/kineto/libkineto/src/ActivityProfilerController.h:79:8: error: ‘atomic_int64_t’ in namespace ‘std’ does not name a type std::atomic_int64_t iterationCount_{-1}; ^ ../third_party/kineto/libkineto/src/ActivityProfilerController.cpp: In member function ‘void libkineto::ActivityProfilerController::step()’: ../third_party/kineto/libkineto/src/ActivityProfilerController.cpp:137:27: error: ‘iterationCount_’ was not declared in this scope int64_t currentIter = ++iterationCount_; ^ ../third_party/kineto/libkineto/src/ActivityProfilerController.cpp: In member function ‘void libkineto::ActivityProfilerController::scheduleTrace(const libkineto::Config&)’: ../third_party/kineto/libkineto/src/ActivityProfilerController.cpp:185:44: error: ‘iterationCount_’ was not declared in this scope if (config.hasProfileStartIteration() && iterationCount_ < 0) { ^ ``` Reviewed By: briancoutinho Differential Revision: D34190739 Pulled By: aaronenyeshi fbshipit-source-id: 8c0baef40cea393495fa12e842af72f733e26e8e
- Loading branch information