Sha256: 7cc3d0aba3ee6a554313aeb454230aca092e9e8f3b4ea7e34def785c98e9a3d8

Contents?: true

Size: 495 Bytes

Versions: 18

Compression:

Stored size: 495 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")
    .add_handler<torch::Error>(handle_error)
    .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

18 entries across 18 versions & 1 rubygems

Version Path
torch-rb-0.13.0 ext/torch/cuda.cpp
torch-rb-0.12.2 ext/torch/cuda.cpp
torch-rb-0.12.1 ext/torch/cuda.cpp
torch-rb-0.12.0 ext/torch/cuda.cpp
torch-rb-0.11.2 ext/torch/cuda.cpp
torch-rb-0.11.1 ext/torch/cuda.cpp
torch-rb-0.11.0 ext/torch/cuda.cpp
torch-rb-0.10.2 ext/torch/cuda.cpp
torch-rb-0.10.1 ext/torch/cuda.cpp
torch-rb-0.10.0 ext/torch/cuda.cpp
torch-rb-0.9.2 ext/torch/cuda.cpp
torch-rb-0.9.1 ext/torch/cuda.cpp
torch-rb-0.9.0 ext/torch/cuda.cpp
torch-rb-0.8.3 ext/torch/cuda.cpp
torch-rb-0.8.2 ext/torch/cuda.cpp
torch-rb-0.8.1 ext/torch/cuda.cpp
torch-rb-0.8.0 ext/torch/cuda.cpp
torch-rb-0.7.0 ext/torch/cuda.cpp