mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-13 09:46:00 +00:00
Port python tests to mscclpp. Please run `mpirun -tag-output -np 8 pytest ./python/test/test_mscclpp.py -x` to start pytest --------- Co-authored-by: Saeed Maleki <saemal@microsoft.com> Co-authored-by: Changho Hwang <changhohwang@microsoft.com> Co-authored-by: Saeed Maleki <30272783+saeedmaleki@users.noreply.github.com>
14 lines
380 B
C++
14 lines
380 B
C++
#include <nanobind/nanobind.h>
|
|
namespace nb = nanobind;
|
|
|
|
namespace mscclpp {
|
|
int getDeviceNumaNode(int cudaDev);
|
|
void numaBind(int node);
|
|
}; // namespace mscclpp
|
|
|
|
void register_numa(nb::module_ &m) {
|
|
nb::module_ sub_m = m.def_submodule("numa", "numa functions");
|
|
sub_m.def("get_device_numa_node", &mscclpp::getDeviceNumaNode);
|
|
sub_m.def("numa_bind", &mscclpp::numaBind);
|
|
}
|