Placeholder Class — pytorch Architecture
Architecture documentation for the Placeholder class in OperationUtils.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/mps/OperationUtils.h lines 110–135
class Placeholder {
public:
Placeholder() : _placeholder(nullptr), _value(nullptr), _tensor(Tensor()) {}
Placeholder(MPSGraphTensor* mpsGraphTensor) : _placeholder(mpsGraphTensor), _value(nullptr), _tensor(Tensor()) {}
Placeholder(MPSGraphTensor* mpsGraphTensor, MPSNDArray* mpsNDArray);
Placeholder(MPSGraphTensor* mpsGraphTensor,
const Tensor& self,
MPSShape* mpsShape = nullptr,
bool gatherTensorData = true,
MPSDataType dataType = MPSDataTypeInvalid,
bool useMPSStridedAPI = true);
MPSGraphTensor* getMPSGraphTensor() {
return _placeholder;
}
MPSGraphTensorData* getMPSGraphTensorData() {
return _value;
}
bool isIntermediate() {
return _value == nullptr;
}
private:
MPSGraphTensor* _placeholder;
MPSGraphTensorData* _value;
Tensor _tensor;
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free