package torch

  1. Overview
  2. Docs
type t = Torch_core.Device.t =
  1. | Cpu
  2. | Cuda of int
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val cuda_if_available : unit -> t
val is_cuda : t -> bool
val get_num_threads : unit -> int
val set_num_threads : int -> unit
OCaml

Innovation. Community. Security.