Skip to content

Commit

Permalink
configure BLAS
Browse files Browse the repository at this point in the history
  • Loading branch information
vpuri3 committed May 14, 2024
1 parent 94696e5 commit e95e827
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/eg1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ using Zygote, Lux, ComponentArrays
using LuxDeviceUtils, CUDA, LuxCUDA
using BenchmarkTools

# configure BLAS
ncores = min(Sys.CPU_THREADS, length(Sys.cpu_info()))
BLAS.set_num_threads(ncores)

# configure CUDA
CUDA.allowscalar(false)

rng = Random.default_rng()
Random.seed!(rng, 0)
device = Lux.gpu_device()
Expand Down

0 comments on commit e95e827

Please sign in to comment.