LaurentMazare / ocaml-torch

OCaml bindings for PyTorch
Apache License 2.0
412 stars 38 forks source link

CPU num threads setter and getter #48

Closed crackcomm closed 4 years ago

crackcomm commented 4 years ago

I really need it.

I'm not sure how to scope it, it's currently in Device module.

Let me know where to move it or if it's easier for you, I don't mind if you do it your way.

Thanks.

LaurentMazare commented 4 years ago

Thanks for the PR, I'll merge it for now although I might do a couple tweaks as I'm trying to keep the ocaml and rust version of torch_api.cpp and this were already exposed on the rust side which is a bit in advance of the ocaml version.