Skip to content

Commit 0cb5659

Browse files
authored
Fixes for Windows. (#2065)
1 parent e4eecb7 commit 0cb5659

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

src/initialization.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ function __init__()
134134
end
135135

136136
# if we're not running under an external profiler, let CUPTI handle NVTX events
137-
if !NVTX.isactive()
137+
# XXX: JuliaGPU/NVTX.jl#37
138+
if !NVTX.isactive() && !Sys.iswindows()
138139
ENV["NVTX_INJECTION64_PATH"] = CUDA_Runtime.libcupti
139140
NVTX.activate()
140141
end

test/core/profile.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ let
7979
@test occursin("cuCtxSynchronize", str)
8080
end
8181

82+
# JuliaGPU/NVTX.jl#37
83+
if !Sys.iswindows()
84+
8285
# NVTX markers
8386
let
8487
str = sprint() do io
@@ -103,6 +106,8 @@ let
103106
@test occursin("a range", str)
104107
end
105108

109+
end
110+
106111
end
107112
end
108113

test/runtests.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ using Distributed
22
using Dates
33
import REPL
44
using Printf: @sprintf
5+
using Base.Filesystem: path_separator
56

67
# parse some command-line arguments
78
function extract_flag!(args, flag, default=nothing; typ=typeof(default))
@@ -53,12 +54,12 @@ end
5354
include("setup.jl") # make sure everything is precompiled
5455

5556
# choose tests
56-
const tests = ["core/initialization"] # needs to run first
57+
const tests = ["core$(path_separator)initialization"] # needs to run first
5758
const test_runners = Dict()
5859
## GPUArrays testsuite
5960
for name in keys(TestSuite.tests)
60-
push!(tests, "gpuarrays$(Base.Filesystem.path_separator)$name")
61-
test_runners["gpuarrays$(Base.Filesystem.path_separator)$name"] = ()->TestSuite.tests[name](CuArray)
61+
push!(tests, "gpuarrays$(path_separator)$name")
62+
test_runners["gpuarrays$(path_separator)$name"] = ()->TestSuite.tests[name](CuArray)
6263
end
6364
## files in the test folder
6465
for (rootpath, dirs, files) in walkdir(@__DIR__)
@@ -310,7 +311,9 @@ try
310311

311312
# tests that muck with the context should not be timed with CUDA events,
312313
# since they won't be valid at the end of the test anymore.
313-
time_source = in(test, ["core/initialization", "base/examples", "base/exceptions"]) ? :julia : :cuda
314+
time_source = in(test, ["core$(path_separator)initialization",
315+
"base$(path_separator)examples",
316+
"base$(path_separator)exceptions"]) ? :julia : :cuda
314317

315318
# run the test
316319
running_tests[test] = now()

0 commit comments

Comments
 (0)