Sha256: 8d89634dc985edfb8175cd19003da7947d2b85d2f5425e48b4979b57e5eab728
Contents?: true
Size: 489 Bytes
Versions: 1
Compression:
Stored size: 489 Bytes
Contents
#include <torch/torch.h> #include <rice/Module.hpp> #include "utils.h" void init_cuda(Rice::Module& m) { Rice::define_module_under(m, "CUDA") .add_handler<torch::Error>(handle_error) .define_singleton_method("available?", &torch::cuda::is_available) .define_singleton_method("device_count", &torch::cuda::device_count) .define_singleton_method("manual_seed", &torch::cuda::manual_seed) .define_singleton_method("manual_seed_all", &torch::cuda::manual_seed_all); }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
torch-rb-0.6.0 | ext/torch/cuda.cpp |