diff --git a/src/initialization.jl b/src/initialization.jl index 4bbf898bac..eb976d8699 100644 --- a/src/initialization.jl +++ b/src/initialization.jl @@ -134,7 +134,8 @@ function __init__() end # if we're not running under an external profiler, let CUPTI handle NVTX events - if !NVTX.isactive() + # XXX: JuliaGPU/NVTX.jl#37 + if !NVTX.isactive() && !Sys.iswindows() ENV["NVTX_INJECTION64_PATH"] = CUDA_Runtime.libcupti NVTX.activate() end diff --git a/test/core/profile.jl b/test/core/profile.jl index 551b0762ce..4ffea08c77 100644 --- a/test/core/profile.jl +++ b/test/core/profile.jl @@ -79,6 +79,8 @@ let @test occursin("cuCtxSynchronize", str) end +if !Sys.iswindows() + # NVTX markers let str = sprint() do io @@ -103,6 +105,8 @@ let @test occursin("a range", str) end +end + end end diff --git a/test/runtests.jl b/test/runtests.jl index 4ac1d24f98..e02a00b0e0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,6 +2,7 @@ using Distributed using Dates import REPL using Printf: @sprintf +using Base.Filesystem: path_separator # parse some command-line arguments function extract_flag!(args, flag, default=nothing; typ=typeof(default)) @@ -53,12 +54,12 @@ end include("setup.jl") # make sure everything is precompiled # choose tests -const tests = ["core/initialization"] # needs to run first +const tests = ["core$(path_separator)initialization"] # needs to run first const test_runners = Dict() ## GPUArrays testsuite for name in keys(TestSuite.tests) - push!(tests, "gpuarrays$(Base.Filesystem.path_separator)$name") - test_runners["gpuarrays$(Base.Filesystem.path_separator)$name"] = ()->TestSuite.tests[name](CuArray) + push!(tests, "gpuarrays$(path_separator)$name") + test_runners["gpuarrays$(path_separator)$name"] = ()->TestSuite.tests[name](CuArray) end ## files in the test folder for (rootpath, dirs, files) in walkdir(@__DIR__) @@ -310,7 +311,9 @@ try # tests that muck with the context should not be timed with CUDA events, # since they won't be valid at the end of the test anymore. - time_source = in(test, ["core/initialization", "base/examples", "base/exceptions"]) ? :julia : :cuda + time_source = in(test, ["core$(path_separator)initialization", + "base$(path_separator)examples", + "base$(path_separator)exceptions"]) ? :julia : :cuda # run the test running_tests[test] = now()