Caffe2 - C++ API
A deep learning, cross platform ML framework
numa.h
1 #pragma once
2 
3 #include <c10/util/Logging.h>
4 #include <c10/util/Optional.h>
5 
6 C10_DECLARE_bool(caffe2_cpu_numa_enabled);
7 
8 namespace c10 {
9 
13 C10_API bool IsNUMAEnabled();
14 
18 C10_API void NUMABind(int numa_node_id);
19 
23 C10_API int GetNUMANode(const void* ptr);
24 
28 C10_API int GetNumNUMANodes();
29 
33 C10_API void NUMAMove(void* ptr, size_t size, int numa_node_id);
34 
38 C10_API int GetCurrentNUMANode();
39 
40 } // namespace c10
void NUMAMove(void *ptr, size_t size, int numa_node_id)
Move the memory pointed to by ptr of a given size to another NUMA node.
Definition: numa.cpp:123
int GetCurrentNUMANode()
Get the current NUMA node id.
Definition: numa.cpp:126
int GetNUMANode(const void *ptr)
Get the NUMA id for a given pointer ptr
Definition: numa.cpp:115
bool IsNUMAEnabled()
Check whether NUMA is enabled.
Definition: numa.cpp:108
To register your own kernel for an operator, do in one (!) cpp file: C10_REGISTER_KERNEL(OperatorHand...
Definition: alias_info.h:7
void NUMABind(int numa_node_id)
Bind to a given NUMA node.
Definition: numa.cpp:112
int GetNumNUMANodes()
Get number of NUMA nodes.
Definition: numa.cpp:119