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

Function TORCH_LIBRARY

csrc/compile/init.cpp:11–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include "z3.h"
10
11TORCH_LIBRARY(dc, m)
12{
13 m.def("allgather_param(Tensor a, int graph_id, int id, ScalarType? dtype = None) -> Tensor");
14 m.def(
15 "prefetch_params_fused(int graph_id, Tensor[] params, int[] ids,"
16 " ScalarType[]? dtypes = None) -> ()");
17 m.def("wait_allgather(Tensor(a) a, int graph_id, int id) -> Tensor(a)");
18 m.def("release_param(Tensor(a) a, int graph_id, int id, int n_users) -> Tensor(a)");
19 m.def("reduce_grad(Tensor a, int graph_id, int id) -> Tensor");
20 m.def("free_tensors(Tensor[] a) -> ()");
21 m.def("offload_tensor(Tensor a, int id, int id) -> Tensor");
22 m.def("reload_tensor(Tensor a, int id, int id) -> Tensor");
23 m.def("wait_offload(Tensor a, int id, int id) -> Tensor");
24 m.def("wait_reload(Tensor a, int id, int id) -> Tensor");
25 m.def("offload_parameter(Tensor a, int id, int id) -> ()");
26 m.def("reload_parameter(Tensor a, int id, int id) -> ()");
27 m.def("end_backward(Any deps, int graph_id, bool release_reduce_buckets) -> ()");
28
29 m.def("test_call(Tensor a) -> Tensor");
30}
31
32TORCH_LIBRARY_IMPL(dc, CPU, m)
33{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected