Skip to content

Commit

Permalink
feat: change second-level spec, from 'nnlib:gemm,dropout' to 'nnlib(g…
Browse files Browse the repository at this point in the history
…emm,dropout)'
  • Loading branch information
skyleaworlder committed Jul 20, 2023
1 parent 1358f3c commit 3bd6f1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ e.g.
```shell
> DEPS_LIST="https://github.com/FluxML/NNlib.jl#backports-0.8.21,https://github.com/skyleaworlder/NNlib.jl#dummy-benchmark-test;Flux,Flux@0.13.12"
> # Only Flux-MLP and all NNlib
> julia --project=benchmark benchmark/runbenchmarks-cli.jl --enable="flux:mlp;nnlib" --deps-list=$DEPS_LIST
> julia --project=benchmark benchmark/runbenchmarks-cli.jl --enable="flux(mlp);nnlib" --deps-list=$DEPS_LIST
> # All benchmarks except Flux, NNlib-gemm and NNlib-activations
> julia --project=benchmark benchmark/runbenchmarks-cli.jl --disable="flux;nnlib:gemm,activations" --deps-list=$DEPS_LIST
> julia --project=benchmark benchmark/runbenchmarks-cli.jl --disable="flux;nnlib(gemm,activations)" --deps-list=$DEPS_LIST
> # Only Flux
> julia --project=benchmark benchmark/runbenchmarks-cli.jl --enable="flux;nnlib" --disable="nnlib" --deps-list=$DEPS_LIST
```
2 changes: 1 addition & 1 deletion src/env_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ function parse_enabled_benchmarks(
single_repo_benchmarks = []
if isempty(segment)
return single_repo_benchmarks
elseif (m = match(r"^(.*?):(.+)$", segment)) !== nothing
elseif (m = match(r"^(.*?)\((.+)\)$", segment)) !== nothing
# e.g. top_level_bg: flux or nnlib
# e.g. second_level_bgs: activations,gemm
top_level_bg, second_level_bgs = m.captures[1], m.captures[2]
Expand Down
4 changes: 2 additions & 2 deletions test/env_utils_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@
@test length(eb4) == 9 # nnlib(9)
@test !get(eb3, "FLUXML_BENCHMARK_FLUX", false)

enable2 = "flux;nnlib:activations"
enable2 = "flux;nnlib(activations)"
eb5 = parse_enabled_benchmarks(enable2, "")
@test length(eb5) == 4 # flux(2), nnlib(2)

enable3 = "flux;nnlib:gemm,conv"
enable3 = "flux;nnlib(gemm,conv)"
eb6 = parse_enabled_benchmarks(enable3, "")
@test length(eb6) == 5 # flux(2), nnlib(3)

Expand Down

0 comments on commit 3bd6f1e

Please sign in to comment.