Skip to content

Bump versions of dependencies #29

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
22 changes: 7 additions & 15 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
ThreadPinning = "811555cd-349b-4f26-b7bc-1f208b848042"
ThreadPools = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"

[weakdeps]
Expand All @@ -28,25 +29,16 @@ CUDAExt = "CUDA"
CairoMakieExt = "CairoMakie"

[compat]
CUDA = "3.8.4, 3.12, 4.4"
CairoMakie = "0.7, 0.10.7, 0.11, 0.12"
CUDA = "5"
CairoMakie = "0.7, 0.10.7, 0.11, 0.12, 0.13"
CpuId = "0.3"
DocStringExtensions = "0.9"
Glob = "1.3"
HDF5 = "0.16"
HDF5 = "0.16, 0.17"
NVTX = "0.3"
Reexport = "1.2"
TestItemRunner = "0.2"
ThreadPinning = "0.3, 0.4, 0.5, 0.6, 0.7"
TestItemRunner = "0.2, 1"
ThreadPinning = "0.3, 0.4, 0.5, 0.6, 0.7, 1"
ThreadPools = "2.1.1"
UnicodePlots = "2.8, 3"
julia = "1.9"

[extras]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"

[targets]
test = ["Test", "InteractiveUtils", "CairoMakie", "CUDA", "TestItemRunner"]
1 change: 1 addition & 0 deletions ext/CUDAExt/CUDAExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ using LinearAlgebra
# pkgs
using UnicodePlots
using NVTX
import ThreadPools

# for usage in CUDAExt
using GPUInspector:
Expand Down
6 changes: 3 additions & 3 deletions ext/CUDAExt/cuda_wrappers.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function supports_get_temperature(nvml_device::NVML.Device)
temp = Ref{UInt32}()
nvml_return = NVML.unsafe_nvmlDeviceGetTemperature(
nvml_return = NVML.unchecked_nvmlDeviceGetTemperature(
nvml_device, CUDA.NVML.NVML_TEMPERATURE_GPU, temp
)
return nvml_return == NVML.NVML_SUCCESS
Expand Down Expand Up @@ -30,7 +30,7 @@ get_temperatures(devices=CUDA.devices()) = [get_temperature(dev) for dev in devi

function supports_get_power_usage(nvml_device::NVML.Device)
power = Ref{UInt32}()
nvml_return = NVML.unsafe_nvmlDeviceGetPowerUsage(nvml_device, power)
nvml_return = NVML.unchecked_nvmlDeviceGetPowerUsage(nvml_device, power)
return nvml_return == NVML.NVML_SUCCESS
end
function supports_get_power_usage(dev::CuDevice)
Expand All @@ -56,7 +56,7 @@ get_power_usages(devices=CUDA.devices()) = [get_power_usage(dev) for dev in devi

function supports_get_gpu_utilization(nvml_device::NVML.Device)
util = Ref{NVML.nvmlUtilization_t}()
nvml_return = NVML.unsafe_nvmlDeviceGetUtilizationRates(nvml_device, util)
nvml_return = NVML.unchecked_nvmlDeviceGetUtilizationRates(nvml_device, util)
return nvml_return == NVML.NVML_SUCCESS
end
function supports_get_gpu_utilization(dev::CuDevice)
Expand Down
2 changes: 1 addition & 1 deletion ext/CUDAExt/implementations/monitoring.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function monitoring_start(

# spawn monitoring
_monitoring!(true)
t = @tspawnat thread _monitor(func_symbol_vec; freq, devices=devs)
t = ThreadPools.@tspawnat thread _monitor(func_symbol_vec; freq, devices=devs)
_set_monitoring_task(t)
return nothing
end
Expand Down
2 changes: 1 addition & 1 deletion ext/CUDAExt/implementations/stresstest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function _run_stresstests(
throw(ArgumentError("length(threads) != length(tests)"))
end
@sync for (i, test) in enumerate(tests)
@tspawnat threads[i] test(; verbose=verbose)
ThreadPools.@tspawnat threads[i] test(; verbose=verbose)
end
else
for test in tests
Expand Down
1 change: 1 addition & 0 deletions src/GPUInspector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ using UnicodePlots
using CpuId: cachesize
using HDF5: h5open
using Glob: glob
import ThreadPools

include("backends.jl")
include("UnitPrefixedBytes.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/stresstest_cpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function _run_stresstests_cpu(
if verbose
@info("Julia thread $(threads[i]) runs test on CPU core $(core).")
end
@tspawnat threads[i] begin
ThreadPools.@tspawnat threads[i] begin
core_before = getcpuid()
pinthread(core)
_stresstest_cpu_kernel(; verbose, kwargs...)
Expand Down
9 changes: 9 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037"
GPUInspector = "608d808f-ff79-47b0-a25d-21f2c9b42853"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"