MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / getExecutor

Function getExecutor

csrc/includes/deepcompile.h:617–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615
616template <typename T, typename U>
617std::shared_ptr<T> getExecutor(long graph_id,
618 const std::unordered_map<long, std::shared_ptr<U>>& executors)
619{
620 assert(hasKey(executors, graph_id));
621 if (auto executor = std::dynamic_pointer_cast<T>(executors.at(graph_id))) { return executor; }
622 throw std::runtime_error("Invalid executor type");
623}
624
625extern std::shared_ptr<DSParamRegistry> param_registry;
626extern std::unordered_map<long, std::shared_ptr<CustomOpExecutor>> executors;

Callers

nothing calls this directly

Calls 1

hasKeyFunction · 0.85

Tested by

no test coverage detected