Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Windows. #2065

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/initialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions test/core/profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ let
@test occursin("cuCtxSynchronize", str)
end

# JuliaGPU/NVTX.jl#37
if !Sys.iswindows()

# NVTX markers
let
str = sprint() do io
Expand All @@ -103,6 +106,8 @@ let
@test occursin("a range", str)
end

end

end
end

Expand Down
11 changes: 7 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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__)
Expand Down Expand Up @@ -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()
Expand Down