Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

edgify / torch   python

Repository URL to install this package:

Version: 2.0.1+cpu 

/ include / torch / csrc / profiler / events.h

#pragma once

#include <array>
#include <cstring>
#include <vector>

namespace torch {
namespace profiler {

/* A vector type to hold a list of performance counters */
using perf_counters_t = std::vector<uint64_t>;

/* Standard list of performance events independent of hardware or backend */
constexpr std::array<const char*, 2> ProfilerPerfEvents = {
    /*
     * Number of Processing Elelement (PE) cycles between two points of interest
     * in time. This should correlate positively with wall-time. Measured in
     * uint64_t. PE can be non cpu. TBD reporting behavior for multiple PEs
     * participating (i.e. threadpool).
     */
    "cycles",

    /* Number of PE instructions between two points of interest in time. This
     * should correlate positively with wall time and the amount of computation
     * (i.e. work). Across repeat executions, the number of instructions should
     * be more or less invariant. Measured in uint64_t. PE can be non cpu.
     */
    "instructions"};
} // namespace profiler
} // namespace torch