OpsList Class — pytorch Architecture
Architecture documentation for the OpsList class in vulkan_api_test.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/test/vulkan_api_test.cpp lines 7264–7295
class OpsList {
public:
OpsList() {}
explicit OpsList(std::vector<std::unique_ptr<BaseOp>> ops)
: ops_(std::move(ops)) {
}
auto run(const at::Tensor& input) {
at::Tensor output = input;
for (const auto& op : ops_) {
output = op->run(output);
}
return output;
}
auto run(const at::Tensor& input, const at::Tensor& v_input) {
at::Tensor output = input;
at::Tensor v_output = v_input;
for (const auto& op : ops_) {
output = op->run(output);
v_output = op->run(v_output);
}
return std::make_pair(output, v_output);
}
protected:
std::vector<std::unique_ptr<BaseOp>> ops_;
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free