File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 7676 - { otp: "25.3.2.15", elixir: "1.15.4" }
7777 - { otp: "25.3.2.15", elixir: "1.16.2", lint: true }
7878 - { otp: "25.3.2.15", elixir: "1.16.2", build: true }
79+ - { otp: "25.3.2.15", elixir: "1.16.2", gpu: true }
80+ - { otp: "25.3.2.15", elixir: "1.16.2", gpu: true, build: true }
7981 env :
8082 MIX_ENV : test
8183 steps :
@@ -142,7 +144,14 @@ jobs:
142144 - name : Run tests
143145 run : |
144146 export PATH="${{ steps.setup.outputs.path }}:${PATH}"
147+ export EMLX_TEST_DEFAULT_GPU="${{ matrix.job.gpu }}"
148+
145149 if [ "${{ matrix.job.build }}" = "true" ]; then
146150 export LIBMLX_BUILD=true
147151 fi
148- mix test --warnings-as-errors
152+
153+ if [ "${{ matrix.job.gpu }}" = "true" ]; then
154+ find test -name "*_test.exs" -exec bash -c 'NAME={}; echo -e "\n\n----$NAME----\n"; mix test $NAME' \;
155+ else
156+ mix test --warnings-as-errors
157+ fi
Original file line number Diff line number Diff line change 1- Application . put_env ( :nx , :default_backend , EMLX.Backend )
1+ backend =
2+ if String . downcase ( System . get_env ( "EMLX_TEST_DEFAULT_GPU" , "false" ) ) in [
3+ "1" ,
4+ "true" ,
5+ "yes" ,
6+ "t" ,
7+ "y"
8+ ] do
9+ { EMLX.Backend , device: :gpu }
10+ else
11+ EMLX.Backend
12+ end
13+
14+ Application . put_env ( :nx , :default_backend , backend )
215
316ExUnit . start ( )
You can’t perform that action at this time.
0 commit comments