Sha256: be9d16bd7f87853afb047f4857cf9a02e9f1509eb048b3b47b706b653a555e45
Contents?: true
Size: 518 Bytes
Versions: 9
Compression:
Stored size: 518 Bytes
Contents
#include <torch/torch.h> #include <rice/rice.hpp> #include "utils.h" void init_backends(Rice::Module& m) { auto rb_mBackends = Rice::define_module_under(m, "Backends"); Rice::define_module_under(rb_mBackends, "OpenMP") .define_singleton_function("available?", &torch::hasOpenMP); Rice::define_module_under(rb_mBackends, "MKL") .define_singleton_function("available?", &torch::hasMKL); Rice::define_module_under(rb_mBackends, "MPS") .define_singleton_function("available?", &torch::hasMPS); }
Version data entries
9 entries across 9 versions & 1 rubygems