Shortcuts

Program Listing for File NPUContext.h

Return to documentation for file (csrc/backend/NPUContext.h)

#pragma once

#include "csrc/backend/NPUDeviceProp.h"
#include "csrc/backend/NPUFunctions.h"

namespace c10::backend {

// NPU is available if we compiled with NPU.
inline bool is_available() {
  return c10::backend::device_count() > 0;
}

NPUDeviceProp* getDeviceProperties(c10::DeviceIndex device);

} // namespace c10::backend

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources