Skip to content

Commit 4c81ef5

Browse files
Remove all get_ function prefixes (#76)
* Remove all get_ function prefixes * Fix rename in print * Include docs in Codecov
1 parent 157764b commit 4c81ef5

File tree

22 files changed

+76
-65
lines changed

22 files changed

+76
-65
lines changed

.github/workflows/BuildDeployDoc.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- dev
78
tags: "*"
89
pull_request:
910

@@ -15,13 +16,26 @@ jobs:
1516
runs-on: ubuntu-latest
1617
steps:
1718
- uses: actions/checkout@v4
18-
- uses: julia-actions/setup-julia@v1
19+
- uses: julia-actions/setup-julia@v2
1920
with:
20-
version: "1.10"
21+
version: '1.10'
22+
- name: Add Julia cache
23+
uses: julia-actions/cache@v2
2124
- name: Install dependencies
2225
run: |
2326
julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
27+
2428
- name: Build and deploy
2529
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
27-
run: julia --project=docs/ docs/make.jl
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: julia --code-coverage=@src --project=docs/ docs/make.jl
32+
33+
- name: Process code coverage
34+
uses: julia-actions/julia-processcoverage@v1
35+
36+
- name: Upload code coverage
37+
uses: codecov/codecov-action@v4
38+
with:
39+
files: ./lcov.inf
40+
flags: unittests
41+
token: ${{ secrets.CODECOV_TOKEN }}

ext/devices/cuda/impl.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ function ComputableDAGs.measure_device!(device::CUDAGPU; verbose::Bool)
66
end
77

88
"""
9-
get_devices(::Type{CUDAGPU}; verbose::Bool)
9+
devices(::Type{CUDAGPU}; verbose::Bool)
1010
1111
Return a Vector of [`CUDAGPU`](@ref)s available on the current machine. If `verbose` is true, print some additional information.
1212
"""
13-
function ComputableDAGs.get_devices(::Type{CUDAGPU}; verbose::Bool = false)
13+
function ComputableDAGs.devices(::Type{CUDAGPU}; verbose::Bool = false)
1414
devices = Vector{ComputableDAGs.AbstractDevice}()
1515

1616
if !CUDA.functional()

ext/devices/oneapi/impl.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ function ComputableDAGs.measure_device!(device::oneAPIGPU; verbose::Bool)
66
end
77

88
"""
9-
get_devices(::Type{oneAPIGPU}; verbose::Bool = false)
9+
devices(::Type{oneAPIGPU}; verbose::Bool = false)
1010
1111
Return a Vector of [`oneAPIGPU`](@ref)s available on the current machine. If `verbose` is true, print some additional information.
1212
"""
13-
function ComputableDAGs.get_devices(::Type{oneAPIGPU}; verbose::Bool = false)
13+
function ComputableDAGs.devices(::Type{oneAPIGPU}; verbose::Bool = false)
1414
devices = Vector{ComputableDAGs.AbstractDevice}()
1515

1616
if !oneAPI.functional()

ext/devices/rocm/impl.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ function ComputableDAGs.measure_device!(device::ROCmGPU; verbose::Bool)
66
end
77

88
"""
9-
get_devices(::Type{ROCmGPU}; verbose::Bool = false)
9+
devices(::Type{ROCmGPU}; verbose::Bool = false)
1010
1111
Return a Vector of [`ROCmGPU`](@ref)s available on the current machine. If `verbose` is true, print some additional information.
1212
"""
13-
function ComputableDAGs.get_devices(::Type{ROCmGPU}; verbose::Bool = false)
13+
function ComputableDAGs.devices(::Type{ROCmGPU}; verbose::Bool = false)
1414
devices = Vector{ComputableDAGs.AbstractDevice}()
1515

1616
if !AMDGPU.functional()

src/ComputableDAGs.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export GraphProperties
1616
export insert_node!, insert_edge!
1717
export is_entry_node, is_exit_node
1818
export compute, data, compute_effort
19-
export get_properties, get_exit_node
19+
export properties, exit_node
2020

2121
# graph operation related
2222
export reset_graph!
@@ -39,7 +39,7 @@ export fixpoint_reached, optimize_to_fixpoint!
3939
export graph
4040

4141
# machine info
42-
export get_machine_info, cpu_st
42+
export machine_info, cpu_st
4343

4444
# GPU Extensions
4545
export kernel, CUDAGPU, ROCmGPU, oneAPIGPU

src/code_gen/tape_machine.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function gen_tape(
239239

240240
# get input symbols
241241
input_syms = Dict{String, Vector{Symbol}}()
242-
for node in get_entry_nodes(dag)
242+
for node in entry_nodes(dag)
243243
if !haskey(input_syms, node.name)
244244
input_syms[node.name] = Vector{Symbol}()
245245
end
@@ -248,7 +248,7 @@ function gen_tape(
248248
end
249249

250250
# get out_symbol
251-
out_sym = Symbol(to_var_name(get_exit_node(dag).id))
251+
out_sym = Symbol(to_var_name(exit_node(dag).id))
252252

253253
assign_inputs = gen_input_assignment_code(input_syms, instance, machine)
254254

src/code_gen/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ function lower(schedule::Vector{Tuple{Node, AbstractDevice}}, machine::Machine)
7575

7676
for (node, device) in schedule
7777
if (node isa DataTaskNode && length(node.children) == 0)
78-
push!(calls, get_init_function_call(node, entry_device(machine)))
78+
push!(calls, init_function_call(node, entry_device(machine)))
7979
else
80-
push!(calls, get_function_call(node, device))
80+
push!(calls, function_call(node, device))
8181
end
8282
end
8383

src/devices/detect.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
2-
get_machine_info(verbose::Bool)
2+
machine_info(verbose::Bool)
33
44
Return the [`Machine`](@ref) currently running on. The parameter `verbose` defaults to true when interactive.
55
"""
6-
function get_machine_info(; verbose::Bool = Base.is_interactive)
6+
function machine_info(; verbose::Bool = Base.is_interactive)
77
devices = Vector{AbstractDevice}()
88

99
for device in device_types()
10-
devs = get_devices(device; verbose = verbose)
10+
devs = devices(device; verbose = verbose)
1111
for dev in devs
1212
push!(devices, dev)
1313
end

src/devices/interface.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ end
2828
2929
Global vector of available and implemented device types. Each implementation of a [`AbstractDevice`](@ref) should add its concrete type to this vector.
3030
31-
See also: [`device_types`](@ref), [`get_devices`](@ref)
31+
See also: [`device_types`](@ref), [`devices`](@ref)
3232
"""
3333
DEVICE_TYPES = Vector{Type}()
3434

3535
"""
36-
get_devices(t::Type{T}; verbose::Bool) where {T <: AbstractDevice}
36+
devices(t::Type{T}; verbose::Bool) where {T <: AbstractDevice}
3737
3838
Interface function that must be implemented for every subtype of [`AbstractDevice`](@ref). Returns a `Vector{Type}` of the devices for the given [`AbstractDevice`](@ref) Type available on the current machine.
3939
"""
40-
function get_devices end
40+
function devices end
4141

4242
"""
4343
measure_device!(device::AbstractDevice; verbose::Bool)

src/devices/numa/impl.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ function measure_device!(device::NumaNode; verbose::Bool)
2222
end
2323

2424
"""
25-
get_devices(deviceType::Type{T}; verbose::Bool) where {T <: NumaNode}
25+
devices(deviceType::Type{T}; verbose::Bool) where {T <: NumaNode}
2626
2727
Return a Vector of [`NumaNode`](@ref)s available on the current machine. If `verbose` is true, print some additional information.
2828
"""
29-
function get_devices(deviceType::Type{T}; verbose::Bool = false) where {T <: NumaNode}
29+
function devices(deviceType::Type{T}; verbose::Bool = false) where {T <: NumaNode}
3030
devices = Vector{AbstractDevice}()
3131
no_numa_nodes = highest_numa_node()
3232

0 commit comments

Comments
 (0)