Home / Class/ IMpsAllocatorCallback Class — pytorch Architecture

IMpsAllocatorCallback Class — pytorch Architecture

Architecture documentation for the IMpsAllocatorCallback class in MPSAllocatorInterface.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/mps/MPSAllocatorInterface.h lines 45–56

class IMpsAllocatorCallback {
 public:
  enum class EventType {
    ALLOCATED, // buffer got allocated to be used immediately
    RECYCLED, // buffer pulled from free list to be reused
    FREED, // buffer put to free list for future recycling
    RELEASED, // buffer memory released
    ALLOCATION_FAILED // buffer allocation failed
  };
  virtual ~IMpsAllocatorCallback() = default;
  virtual void executeMPSAllocatorCallback(void* ptr, EventType event) = 0;
};

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free