|  | 
| 1 |  | -using Test | 
| 2 |  | -using Lux | 
| 3 |  | -using GNNLux | 
| 4 |  | -using Random, Statistics | 
|  | 1 | +using TestItemRunner | 
| 5 | 2 | 
 | 
| 6 |  | -using ReTestItems | 
| 7 |  | -# using Pkg, Preferences, Test | 
| 8 |  | -# using InteractiveUtils, Hwloc | 
|  | 3 | +## See https://www.julia-vscode.org/docs/stable/userguide/testitems/ | 
|  | 4 | +## for how to run the tests within VS Code. | 
|  | 5 | +## See test_module.jl for the test infrastructure. | 
| 9 | 6 | 
 | 
| 10 |  | -runtests(GNNLux) | 
|  | 7 | +## Uncomment below and in test_module.jl to change the default test settings | 
|  | 8 | +# ENV["GNN_TEST_CPU"] = "false" | 
|  | 9 | +# ENV["GNN_TEST_CUDA"] = "true" | 
|  | 10 | +# ENV["GNN_TEST_AMDGPU"] = "true" | 
|  | 11 | +# ENV["GNN_TEST_Metal"] = "true" | 
|  | 12 | + | 
|  | 13 | +# The only available tag at the moment is :gpu | 
|  | 14 | +# Tests not tagged with :gpu are considered to be CPU tests | 
|  | 15 | +# Tests tagged with :gpu should run on all GPU backends | 
|  | 16 | + | 
|  | 17 | +# TODO add gpu tests. Not urgent since almost the whole path for layers is tested  | 
|  | 18 | +# in GraphNeuralNetworks.jl | 
|  | 19 | + | 
|  | 20 | +if get(ENV, "GNN_TEST_CPU", "true") == "true" | 
|  | 21 | +    @run_package_tests filter = ti -> :gpu ∉ ti.tags | 
|  | 22 | +end | 
|  | 23 | +if get(ENV, "GNN_TEST_CUDA", "false") == "true" | 
|  | 24 | +    @run_package_tests filter = ti -> :gpu ∈ ti.tags | 
|  | 25 | +end | 
|  | 26 | +if get(ENV, "GNN_TEST_AMDGPU", "false") == "true" | 
|  | 27 | +    @run_package_tests filter = ti -> :gpu ∈ ti.tags | 
|  | 28 | +end | 
|  | 29 | +if get(ENV, "GNN_TEST_Metal", "false") == "true" | 
|  | 30 | +    @run_package_tests filter = ti -> :gpu ∈ ti.tags | 
|  | 31 | +end | 
0 commit comments