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

Function shared_create

csrc/cpu/comm/shm.cpp:69–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void shared_create(SharedData* data, const char* name, void* bytes, size_t nbytes)
70{
71 int d = shm_open(name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
72 if (d != -1) {
73 if (nbytes = write(d, bytes, nbytes)) { shared_open(data, name, nbytes); }
74 } else {
75 printf("shared_create %s failed\n", name);
76 }
77}
78
79void shared_close(SharedData* data)
80{

Callers 1

shm_initializeFunction · 0.85

Calls 1

shared_openFunction · 0.85

Tested by

no test coverage detected