Simplify Tensor::randn. (#255)

* Simplify Tensor::randn.

* Also switch Tensor::rand to use a generic dtype.

* Support sampling for f16.

* Cleanup.
This commit is contained in:
Laurent Mazare
2023-07-27 07:40:36 +01:00
committed by GitHub
parent 89ba005962
commit 6475bfadfe
10 changed files with 111 additions and 72 deletions

View File

@ -23,7 +23,7 @@ cudarc = { git = "https://github.com/LaurentMazare/cudarc.git", branch = "cublas
# TODO: Switch back to the official gemm implementation if we manage to upstream the changes.
gemm = { git = "https://github.com/LaurentMazare/gemm.git" }
hf-hub = "0.1.3"
half = { version = "2.3.1", features = ["num-traits"] }
half = { version = "2.3.1", features = ["num-traits", "rand_distr"] }
intel-mkl-src = { version = "0.8.1", features = ["mkl-static-lp64-iomp"] }
libc = { version = "0.2.147" }
log = "0.4"