Sha256: 6ef72afbd3ca219e8dbde5cec0291e765ab0212d35a5714d803866bee1a33cad

Contents?: true

Size: 450 Bytes

Versions: 9

Compression:

Stored size: 450 Bytes

Contents

#include <torch/torch.h>

#include <rice/rice.hpp>

#include "utils.h"

void init_cuda(Rice::Module& m) {
  Rice::define_module_under(m, "CUDA")
    .define_singleton_function("available?", &torch::cuda::is_available)
    .define_singleton_function("device_count", &torch::cuda::device_count)
    .define_singleton_function("manual_seed", &torch::cuda::manual_seed)
    .define_singleton_function("manual_seed_all", &torch::cuda::manual_seed_all);
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
torch-rb-0.18.0 ext/torch/cuda.cpp
torch-rb-0.17.1 ext/torch/cuda.cpp
torch-rb-0.17.0 ext/torch/cuda.cpp
torch-rb-0.16.0 ext/torch/cuda.cpp
torch-rb-0.15.0 ext/torch/cuda.cpp
torch-rb-0.14.1 ext/torch/cuda.cpp
torch-rb-0.14.0 ext/torch/cuda.cpp
torch-rb-0.13.2 ext/torch/cuda.cpp
torch-rb-0.13.1 ext/torch/cuda.cpp