Skip to content

Make test/Project.toml a superset of examples/Project.toml#241

Open
AntonOresten wants to merge 1 commit into
JuliaGPU:mainfrom
AntonOresten:test-examples
Open

Make test/Project.toml a superset of examples/Project.toml#241
AntonOresten wants to merge 1 commit into
JuliaGPU:mainfrom
AntonOresten:test-examples

Conversation

@AntonOresten
Copy link
Copy Markdown
Collaborator

Cuts the number of dependencies in the examples/ environment in half by using CUDA directly, allowing the dependencies of the test/ environment to be a superset with the addition of only NVTX and FFTW. This eliminates the need to reset the active project to the examples/ environment.

I encountered this problem in #239 while wanting to quickly run tests in a fresh cloud environment:

]add https://github.com/JuliaGPU/cuTile.jl#<branch>
]test cuTile

Otherwise I'd have to clone, activate by path, and instantiate.

This should only make running an example / benchmark slightly slower, since cuSOLVER, cuSPARSE, and CUDATools are now indirect dependencies of examples/.

@maleadt
Copy link
Copy Markdown
Member

maleadt commented May 30, 2026

I encountered this problem in #239 while wanting to quickly run tests in a fresh cloud environment:

]add https://github.com/JuliaGPU/cuTile.jl#<branch>
]test cuTile

Otherwise I'd have to clone, activate by path, and instantiate.

Can you elaborate? I don't understand what the issue is. CI does exactly this, and it works

@AntonOresten
Copy link
Copy Markdown
Collaborator Author

AntonOresten commented May 30, 2026

The issue is specifically when the cuTile workspace hasn't been instantiated. If we only add cuTile to an external environment, FFTW and others (which previously only existed in cuTile/examples) are never added.

@AntonOresten
Copy link
Copy Markdown
Collaborator Author

AntonOresten commented May 30, 2026

i.e. with ]test cuTile I get:

Test Summary:              | Pass  Error  Total   Time
  Overall                  | 2348      1   2349  53.0s
    codegen/cse            |    7             7   4.9s
    codegen/rng_intrinsics |    5             5   7.0s
    codegen/reflection     |    9             9   6.2s
    device/types           |    4             4   9.0s
    device/math            |    8             8   9.5s
    extensions/DLFP8Types  |    5             5   6.6s
    device/gather_scatter  |   16            16   7.0s
    codegen/fpmode         |    7             7   2.7s
    codegen/assume         |   11            11   7.6s
    device/slice           |    7             7   3.4s
    extensions/Microfloats |    8             8   1.2s
    device/views           |    5             5   2.7s
    codegen/views          |    4             4   1.7s
    device/hints           |   11            11  12.1s
    host/broadcast         |   17            17  12.7s
    device/print           |    5             5   1.7s
    device/integration     |    1             1   1.4s
    device/kernel_state    |    3             3   0.6s
    device/control_flow    |   13            13  14.5s
    host/cache             |   30            30   1.2s
    codegen/kernel_state   |    1             1   1.7s
    analysis/dataflow      |   11            11   0.6s
    types                  |   99            99   0.6s
    examples/vadd          |                  0  10.8s
    device/atomics         |   26            26  17.8s
    examples/fft           |           1      1   0.3s
    examples/transpose     |                  0   2.1s
    codegen/slice          |    8             8   4.3s
    examples/batchmatmul   |                  0  10.4s
    codegen/bounds         |   19            19   1.6s
    codegen/no_wrap        |    8             8   1.3s
    examples/softmax       |                  0  11.2s
    examples/matmul        |                  0   5.6s
    examples/layernorm     |                  0  16.9s
    codegen/integration    |   87            87  26.1s
    device/broadcast       |  119           119  26.2s
    examples/fmha          |                  0  18.2s
    device/core            |   39            39  30.1s
    examples/moe           |                  0  20.3s
    device/random          |  480           480  33.5s
    host/mapreduce         |   29            29  31.2s
    device/tile            |  139           139  31.9s
    codegen/operations     |  180           180  40.2s
    device/reductions      |  927           927  43.9s
    FAILURE

Error in testset examples/fft:
Error During Test at /home/anton/.julia/packages/cuTile/DnjqE/test/setup.jl:46
  Got exception outside of a @test
  LoadError: ArgumentError: Package FFTW [7a1cc6ca-52ef-59f5-83cd-3a7055c09341] is required but does not seem to be installed:
   - Run `Pkg.instantiate()` to install all recorded dependencies.

  Stacktrace:
    [1] __require_prelocked(pkg::Base.PkgId, env::String)
      @ Base ./loading.jl:2617
    [2] _require_prelocked(uuidkey::Base.PkgId, env::String)
      @ Base ./loading.jl:2495
    [3] macro expansion
      @ ./loading.jl:2423 [inlined]
    [4] macro expansion
      @ ./lock.jl:376 [inlined]
    [5] __require(into::Module, mod::Symbol)
      @ Base ./loading.jl:2388
    [6] require(into::Module, mod::Symbol)
      @ Base ./loading.jl:2364
    [7] include(mapexpr::Function, mod::Module, _path::String)
      @ Base ./Base.jl:307
    [8] IncludeInto
      @ ./Base.jl:308 [inlined]
    [9] (::Main.var"##examples/fft#494".var"#5#6")()
      @ Main.var"##examples/fft#494" ~/.julia/packages/cuTile/DnjqE/test/runtests.jl:40
   [10] (::Base.RedirectStdStream)(thunk::Main.var"##examples/fft#494".var"#5#6", stream::Base.DevNull)
      @ Base ./stream.jl:1464
   [11] (::Main.var"##examples/fft#494".var"#3#4")()
      @ Main.var"##examples/fft#494" ~/.julia/packages/cuTile/DnjqE/test/runtests.jl:39
   [12] cd(f::Main.var"##examples/fft#494".var"#3#4", dir::String)
      @ Base.Filesystem ./file.jl:112
   [13] macro expansion
      @ ~/.julia/packages/cuTile/DnjqE/test/runtests.jl:35 [inlined]
   [14] macro expansion
      @ ~/.julia/packages/cuTile/DnjqE/test/setup.jl:47 [inlined]
   [15] macro expansion
      @ ~/.julia/juliaup/julia-1.12.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.12/Test/src/Test.jl:1777 [inlined]
   [16] macro expansion
      @ ~/.julia/packages/cuTile/DnjqE/test/setup.jl:47 [inlined]
   [17] macro expansion
      @ ~/.julia/juliaup/julia-1.12.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.12/Test/src/Test.jl:1777 [inlined]
   [18] macro expansion
      @ ~/.julia/packages/cuTile/DnjqE/test/setup.jl:46 [inlined]
   [19] macro expansion
      @ ~/.julia/packages/CUDACore/sIGRL/src/utilities.jl:35 [inlined]
   [20] macro expansion
      @ ~/.julia/packages/CUDACore/sIGRL/src/memory.jl:896 [inlined]
   [21] top-level scope
      @ ~/.julia/packages/cuTile/DnjqE/test/setup.jl:45
   [22] eval(m::Module, e::Any)
      @ Core ./boot.jl:489
   [23] execute(::Type{cuTileTestRecord}, mod::Module, f::Expr, name::String, start_time::Float64, custom_args::@NamedTuple{})
      @ Main ~/.julia/packages/cuTile/DnjqE/test/setup.jl:42
   [24] (::ParallelTestRunner.var"#inner#runtest##0"{Type{cuTileTestRecord}, Expr, String, Expr, Float64, @NamedTuple{}})()
      @ ParallelTestRunner ~/.julia/packages/ParallelTestRunner/anvy6/src/ParallelTestRunner.jl:429
   [25] runtest(RecordType::Type{cuTileTestRecord}, f::Expr, name::String, init_code::Expr, start_time::Float64, custom_args::@NamedTuple{})
      @ ParallelTestRunner ~/.julia/packages/ParallelTestRunner/anvy6/src/ParallelTestRunner.jl:440
   [26] (::var"#handle##0#handle##1"{Sockets.TCPSocket, UInt64, Bool, @Kwargs{}, Tuple{typeof(ParallelTestRunner.runtest), DataType, Expr, String, Expr, Float64, @NamedTuple{}}, typeof(invokelatest)})()
      @ Main ~/.julia/packages/Malt/OteGQ/src/worker.jl:120
  in expression starting at /home/anton/.julia/packages/cuTile/DnjqE/examples/fft.jl:16
ERROR: LoadError: Test run finished with errors
in expression starting at /home/anton/.julia/packages/cuTile/DnjqE/test/runtests.jl:92
ERROR: Package cuTile errored during testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants