From e0133b846136b6020c15d167ff8dd5f1c331c326 Mon Sep 17 00:00:00 2001 From: Willow Ahrens Date: Wed, 5 Feb 2025 20:12:27 -0500 Subject: [PATCH] more rename --- src/architecture.jl | 4 ++-- src/interface/abstract_arrays.jl | 2 +- src/lower.jl | 4 ++-- src/tensors/fibers.jl | 12 ++++++------ src/tensors/levels/atomic_element_levels.jl | 2 +- src/tensors/levels/dense_levels.jl | 4 ++-- src/tensors/levels/dense_rle_levels.jl | 6 +++--- src/tensors/levels/element_levels.jl | 2 +- src/tensors/levels/mutex_levels.jl | 4 ++-- src/tensors/levels/pattern_levels.jl | 2 +- src/tensors/levels/separate_levels.jl | 4 ++-- src/tensors/levels/shard_levels.jl | 4 ++-- src/tensors/levels/sparse_band_levels.jl | 4 ++-- src/tensors/levels/sparse_bytemap_levels.jl | 4 ++-- src/tensors/levels/sparse_coo_levels.jl | 4 ++-- src/tensors/levels/sparse_dict_levels.jl | 4 ++-- src/tensors/levels/sparse_list_levels.jl | 4 ++-- src/tensors/levels/sparse_point_levels.jl | 4 ++-- src/tensors/levels/sparse_rle_levels.jl | 6 +++--- src/tensors/levels/sparse_vbl_levels.jl | 4 ++-- src/tensors/scalars.jl | 8 ++++---- 21 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/architecture.jl b/src/architecture.jl index 4474351b1..09c71137c 100644 --- a/src/architecture.jl +++ b/src/architecture.jl @@ -329,9 +329,9 @@ and copies the data in to it, according to the `device` trait. function bcast end """ - virtual_bcast(device, arr) + bcast_send(device, arr) If the virtual array is not on the given device, copy the array to that device. This function is used to move data to the device before a kernel is launched. """ -function virtual_bcast end \ No newline at end of file +function bcast_send end \ No newline at end of file diff --git a/src/interface/abstract_arrays.jl b/src/interface/abstract_arrays.jl index c0d7fa057..f8bb4c074 100644 --- a/src/interface/abstract_arrays.jl +++ b/src/interface/abstract_arrays.jl @@ -130,7 +130,7 @@ FinchNotation.finch_leaf(x::VirtualAbstractArray) = virtual(x) virtual_fill_value(ctx, ::VirtualAbstractArray) = 0 virtual_eltype(ctx, tns::VirtualAbstractArray) = tns.eltype -function virtual_bcast(ctx, vec::VirtualAbstractArray, device) +function bcast_send(ctx, vec::VirtualAbstractArray, device) ex = freshen(ctx, vec.ex) push_preamble!( ctx, diff --git a/src/lower.jl b/src/lower.jl index 05bb4681f..cd76a232a 100644 --- a/src/lower.jl +++ b/src/lower.jl @@ -342,14 +342,14 @@ function lower_parallel_loop(ctx, root, ext::ParallelDimension, device::VirtualC ) for tns in setdiff(used_in_scope, decl_in_scope) - virtual_bcast(ctx, resolve(ctx, tns), device) + bcast_send(ctx, resolve(ctx, tns), device) end virtual_parallel_region(ctx, device) do ctx_2 subtask = get_task(ctx_2) tid = get_task_num(subtask) for tns in intersect(used_in_scope, decl_in_scope) - virtual_bcast(ctx_2, resolve(ctx_2, tns), subtask) + bcast_send(ctx_2, resolve(ctx_2, tns), subtask) end contain(ctx_2) do ctx_3 open_scope(ctx_3) do ctx_4 diff --git a/src/tensors/fibers.jl b/src/tensors/fibers.jl index 566abde8f..e41680b45 100644 --- a/src/tensors/fibers.jl +++ b/src/tensors/fibers.jl @@ -139,12 +139,12 @@ function unfurl(ctx::AbstractCompiler, arr::VirtualFiber, ext, mode, proto) unfurl(ctx, VirtualSubFiber(arr.lvl, literal(1)), ext, mode, proto) end -function virtual_bcast(ctx::AbstractCompiler, fbr::VirtualFiber, arch) - virtual_bcast_level(ctx, fbr.lvl, arch) +function bcast_send(ctx::AbstractCompiler, fbr::VirtualFiber, arch) + bcast_send_level(ctx, fbr.lvl, arch) end -function virtual_bcast(ctx::AbstractCompiler, fbr::VirtualSubFiber, arch) - virtual_bcast_level(ctx, fbr.lvl, arch) +function bcast_send(ctx::AbstractCompiler, fbr::VirtualSubFiber, arch) + bcast_send_level(ctx, fbr.lvl, arch) end struct HollowSubFiber{Lvl,Pos,Dirty} <: AbstractFiber{Lvl} @@ -171,9 +171,9 @@ function lower(ctx::AbstractCompiler, fbr::VirtualHollowSubFiber, ::DefaultStyle end FinchNotation.finch_leaf(x::VirtualHollowSubFiber) = virtual(x) -function virtual_bcast(ctx::AbstractCompiler, fbr::VirtualHollowSubFiber, arch) +function bcast_send(ctx::AbstractCompiler, fbr::VirtualHollowSubFiber, arch) return VirtualHollowSubFiber( - virtual_bcast_level(ctx, fbr.lvl, arch), fbr.pos, fbr.dirty + bcast_send_level(ctx, fbr.lvl, arch), fbr.pos, fbr.dirty ) end diff --git a/src/tensors/levels/atomic_element_levels.jl b/src/tensors/levels/atomic_element_levels.jl index 1b0bc3bf4..8146d4d67 100644 --- a/src/tensors/levels/atomic_element_levels.jl +++ b/src/tensors/levels/atomic_element_levels.jl @@ -165,7 +165,7 @@ function reassemble_level!(ctx, lvl::VirtualAtomicElementLevel, pos_start, pos_s lvl end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualAtomicElementLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualAtomicElementLevel, arch) val_2 = freshen(ctx, :val) push_preamble!( ctx, diff --git a/src/tensors/levels/dense_levels.jl b/src/tensors/levels/dense_levels.jl index 23fa43d63..02f32fd53 100644 --- a/src/tensors/levels/dense_levels.jl +++ b/src/tensors/levels/dense_levels.jl @@ -201,8 +201,8 @@ function freeze_level!(ctx::AbstractCompiler, lvl::VirtualDenseLevel, pos) return lvl end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualDenseLevel, arch) - virtual_bcast_level(ctx, lvl.lvl, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualDenseLevel, arch) + bcast_send_level(ctx, lvl.lvl, arch) end struct DenseTraversal diff --git a/src/tensors/levels/dense_rle_levels.jl b/src/tensors/levels/dense_rle_levels.jl index 08702681b..32f21499a 100644 --- a/src/tensors/levels/dense_rle_levels.jl +++ b/src/tensors/levels/dense_rle_levels.jl @@ -295,7 +295,7 @@ function virtual_level_resize!(ctx, lvl::VirtualRunListLevel, dims...) lvl end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualRunListLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualRunListLevel, arch) ptr_2 = freshen(ctx, lvl.ptr) right_2 = freshen(ctx, lvl.right) push_preamble!( @@ -314,8 +314,8 @@ function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualRunListLevel, ar $(lvl.right) = $right_2 end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) - virtual_bcast_level(ctx, lvl.buf, arch) + bcast_send_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.buf, arch) end virtual_level_eltype(lvl::VirtualRunListLevel) = virtual_level_eltype(lvl.lvl) diff --git a/src/tensors/levels/element_levels.jl b/src/tensors/levels/element_levels.jl index 8392a0b8c..450d83252 100644 --- a/src/tensors/levels/element_levels.jl +++ b/src/tensors/levels/element_levels.jl @@ -171,7 +171,7 @@ function reassemble_level!(ctx, lvl::VirtualElementLevel, pos_start, pos_stop) lvl end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualElementLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualElementLevel, arch) val_2 = freshen(ctx, :val) push_preamble!( ctx, diff --git a/src/tensors/levels/mutex_levels.jl b/src/tensors/levels/mutex_levels.jl index 50912d9c8..72f4a6b66 100644 --- a/src/tensors/levels/mutex_levels.jl +++ b/src/tensors/levels/mutex_levels.jl @@ -207,7 +207,7 @@ function thaw_level!(ctx::AbstractCompiler, lvl::VirtualMutexLevel, pos) return lvl end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualMutexLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualMutexLevel, arch) #Add for seperation level too. atomics = freshen(ctx, :locksArray) @@ -224,7 +224,7 @@ function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualMutexLevel, arch $(lvl.locks) = $atomics end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.lvl, arch) end function instantiate(ctx, fbr::VirtualSubFiber{VirtualMutexLevel}, mode) diff --git a/src/tensors/levels/pattern_levels.jl b/src/tensors/levels/pattern_levels.jl index 8ad008967..9e58f4f70 100644 --- a/src/tensors/levels/pattern_levels.jl +++ b/src/tensors/levels/pattern_levels.jl @@ -93,7 +93,7 @@ struct VirtualPatternLevel <: AbstractVirtualLevel Tp end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualPatternLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualPatternLevel, arch) end is_level_injective(ctx, ::VirtualPatternLevel) = [] diff --git a/src/tensors/levels/separate_levels.jl b/src/tensors/levels/separate_levels.jl index 6702b7925..315602b39 100644 --- a/src/tensors/levels/separate_levels.jl +++ b/src/tensors/levels/separate_levels.jl @@ -146,7 +146,7 @@ virtual_level_size(ctx, lvl::VirtualSeparateLevel) = virtual_level_size(ctx, lvl virtual_level_eltype(lvl::VirtualSeparateLevel) = virtual_level_eltype(lvl.lvl) virtual_level_fill_value(lvl::VirtualSeparateLevel) = virtual_level_fill_value(lvl.lvl) -function virtual_bcast_level(ctx, lvl::VirtualSeparateLevel, arch) +function bcast_send_level(ctx, lvl::VirtualSeparateLevel, arch) # Need to move each pointer... val_2 = freshen(ctx, lvl.val) @@ -163,7 +163,7 @@ function virtual_bcast_level(ctx, lvl::VirtualSeparateLevel, arch) $(lvl.val) = $val_2 end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.lvl, arch) end function declare_level!(ctx, lvl::VirtualSeparateLevel, pos, init) diff --git a/src/tensors/levels/shard_levels.jl b/src/tensors/levels/shard_levels.jl index 50c8cedfb..f63d5a5b1 100644 --- a/src/tensors/levels/shard_levels.jl +++ b/src/tensors/levels/shard_levels.jl @@ -212,7 +212,7 @@ virtual_level_size(ctx, lvl::VirtualShardLevel) = virtual_level_size(ctx, lvl.lv virtual_level_eltype(lvl::VirtualShardLevel) = virtual_level_eltype(lvl.lvl) virtual_level_fill_value(lvl::VirtualShardLevel) = virtual_level_fill_value(lvl.lvl) -function virtual_bcast_level(ctx, lvl::VirtualShardLevel, arch) +function bcast_send_level(ctx, lvl::VirtualShardLevel, arch) val_2 = freshen(ctx, lvl.val) push_preamble!( ctx, @@ -227,7 +227,7 @@ function virtual_bcast_level(ctx, lvl::VirtualShardLevel, arch) $(lvl.val) = $val_2 end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.lvl, arch) end function declare_level!(ctx, lvl::VirtualShardLevel, pos, init) diff --git a/src/tensors/levels/sparse_band_levels.jl b/src/tensors/levels/sparse_band_levels.jl index 032fbd7eb..c1a7cbd56 100644 --- a/src/tensors/levels/sparse_band_levels.jl +++ b/src/tensors/levels/sparse_band_levels.jl @@ -241,7 +241,7 @@ end virtual_level_eltype(lvl::VirtualSparseBandLevel) = virtual_level_eltype(lvl.lvl) virtual_level_fill_value(lvl::VirtualSparseBandLevel) = virtual_level_fill_value(lvl.lvl) -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseBandLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualSparseBandLevel, arch) tbl_2 = freshen(ctx, lvl.tbl) ofs_2 = freshen(ctx, lvl.ofs) push_preamble!( @@ -260,7 +260,7 @@ function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseBandLevel, $(lvl.ofs) = $ofs_2 end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.lvl, arch) end function declare_level!(ctx::AbstractCompiler, lvl::VirtualSparseBandLevel, pos, init) diff --git a/src/tensors/levels/sparse_bytemap_levels.jl b/src/tensors/levels/sparse_bytemap_levels.jl index ee7a4e5af..01e2d60f8 100644 --- a/src/tensors/levels/sparse_bytemap_levels.jl +++ b/src/tensors/levels/sparse_bytemap_levels.jl @@ -239,7 +239,7 @@ function lower(ctx::AbstractCompiler, lvl::VirtualSparseByteMapLevel, ::DefaultS end end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseByteMapLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualSparseByteMapLevel, arch) ptr_2 = freshen(ctx, lvl.ptr) tbl_2 = freshen(ctx, lvl.tbl) srt_2 = freshen(ctx, lvl.srt) @@ -262,7 +262,7 @@ function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseByteMapLev $(lvl.srt) = $srt_2 end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.lvl, arch) end Base.summary(lvl::VirtualSparseByteMapLevel) = "SparseByteMap($(summary(lvl.lvl)))" diff --git a/src/tensors/levels/sparse_coo_levels.jl b/src/tensors/levels/sparse_coo_levels.jl index 04108d6a2..33067469e 100644 --- a/src/tensors/levels/sparse_coo_levels.jl +++ b/src/tensors/levels/sparse_coo_levels.jl @@ -344,7 +344,7 @@ function freeze_level!(ctx::AbstractCompiler, lvl::VirtualSparseCOOLevel, pos_st return lvl end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseCOOLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualSparseCOOLevel, arch) ptr_2 = freshen(ctx, lvl.ptr) push_preamble!( ctx, @@ -376,7 +376,7 @@ function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseCOOLevel, ) idx_2 end - virtual_bcast_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.lvl, arch) end struct SparseCOOWalkTraversal diff --git a/src/tensors/levels/sparse_dict_levels.jl b/src/tensors/levels/sparse_dict_levels.jl index e7cc89979..b5a95a852 100644 --- a/src/tensors/levels/sparse_dict_levels.jl +++ b/src/tensors/levels/sparse_dict_levels.jl @@ -385,7 +385,7 @@ function thaw_level!(ctx::AbstractCompiler, lvl::VirtualSparseDictLevel, pos_sto return lvl end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseDictLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualSparseDictLevel, arch) ptr_2 = freshen(ctx, lvl.ptr) idx_2 = freshen(ctx, lvl.idx) tbl_2 = freshen(ctx, lvl.tbl_2) @@ -402,7 +402,7 @@ function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseDictLevel, $(lvl.tbl) = $tbl_2 end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.lvl, arch) end function unfurl( diff --git a/src/tensors/levels/sparse_list_levels.jl b/src/tensors/levels/sparse_list_levels.jl index 7931c571e..e0c082192 100644 --- a/src/tensors/levels/sparse_list_levels.jl +++ b/src/tensors/levels/sparse_list_levels.jl @@ -313,7 +313,7 @@ function thaw_level!(ctx::AbstractCompiler, lvl::VirtualSparseListLevel, pos_sto return lvl end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseListLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualSparseListLevel, arch) ptr_2 = freshen(ctx, lvl.ptr) idx_2 = freshen(ctx, lvl.idx) push_preamble!( @@ -332,7 +332,7 @@ function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseListLevel, $(lvl.idx) = $idx_2 end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.lvl, arch) end function unfurl( diff --git a/src/tensors/levels/sparse_point_levels.jl b/src/tensors/levels/sparse_point_levels.jl index 37e25ebf4..ff0074314 100644 --- a/src/tensors/levels/sparse_point_levels.jl +++ b/src/tensors/levels/sparse_point_levels.jl @@ -254,7 +254,7 @@ function thaw_level!(ctx::AbstractCompiler, lvl::VirtualSparsePointLevel, pos_st return lvl end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparsePointLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualSparsePointLevel, arch) ptr_2 = freshen(ctx, lvl.ptr) idx_2 = freshen(ctx, lvl.idx) push_preamble!( @@ -270,7 +270,7 @@ function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparsePointLevel $(lvl.idx) = $idx_2 end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.lvl, arch) end function unfurl( diff --git a/src/tensors/levels/sparse_rle_levels.jl b/src/tensors/levels/sparse_rle_levels.jl index dd507c86b..6de2ac721 100644 --- a/src/tensors/levels/sparse_rle_levels.jl +++ b/src/tensors/levels/sparse_rle_levels.jl @@ -303,7 +303,7 @@ function virtual_level_resize!(ctx, lvl::VirtualSparseRunListLevel, dims...) lvl end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseRunListLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualSparseRunListLevel, arch) ptr_2 = freshen(ctx, lvl.ptr) left_2 = freshen(ctx, lvl.left) right_2 = freshen(ctx, lvl.right) @@ -326,8 +326,8 @@ function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseRunListLev $(lvl.right) = $right_2 end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) - virtual_bcast_level(ctx, lvl.buf, arch) + bcast_send_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.buf, arch) end virtual_level_eltype(lvl::VirtualSparseRunListLevel) = virtual_level_eltype(lvl.lvl) diff --git a/src/tensors/levels/sparse_vbl_levels.jl b/src/tensors/levels/sparse_vbl_levels.jl index 67d578a93..c05b44f1f 100644 --- a/src/tensors/levels/sparse_vbl_levels.jl +++ b/src/tensors/levels/sparse_vbl_levels.jl @@ -289,7 +289,7 @@ function virtual_level_fill_value(lvl::VirtualSparseBlockListLevel) virtual_level_fill_value(lvl.lvl) end -function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseBlockListLevel, arch) +function bcast_send_level(ctx::AbstractCompiler, lvl::VirtualSparseBlockListLevel, arch) ptr_2 = freshen(ctx, lvl.ptr) tbl_2 = freshen(ctx, lvl.tbl) ofs_2 = freshen(ctx, lvl.ofs) @@ -312,7 +312,7 @@ function virtual_bcast_level(ctx::AbstractCompiler, lvl::VirtualSparseBlockListL $(lvl.ofs) = $ofs_2 end, ) - virtual_bcast_level(ctx, lvl.lvl, arch) + bcast_send_level(ctx, lvl.lvl, arch) end function declare_level!(ctx::AbstractCompiler, lvl::VirtualSparseBlockListLevel, pos, init) diff --git a/src/tensors/scalars.jl b/src/tensors/scalars.jl index c30a1b722..583779113 100644 --- a/src/tensors/scalars.jl +++ b/src/tensors/scalars.jl @@ -41,7 +41,7 @@ function virtualize(ctx, ex, ::Type{Scalar{Vf,Tv}}, tag) where {Vf,Tv} VirtualScalar(sym, Tv, Vf, tag, val) end -virtual_bcast(ctx, lvl::VirtualScalar, arch) = lvl +bcast_send(ctx, lvl::VirtualScalar, arch) = lvl virtual_size(ctx, ::VirtualScalar) = () @@ -147,7 +147,7 @@ virtual_size(ctx, ::VirtualSparseScalar) = () virtual_fill_value(ctx, tns::VirtualSparseScalar) = tns.Vf virtual_eltype(tns::VirtualSparseScalar, ctx) = tns.Tv -virtual_bcast(ctx, lvl::VirtualSparseScalar, arch) = lvl +bcast_send(ctx, lvl::VirtualSparseScalar, arch) = lvl function declare!(ctx, tns::VirtualSparseScalar, init) push_preamble!( @@ -289,7 +289,7 @@ function lower_assign(ctx, tns::VirtualShortCircuitScalar, mode, op, rhs) :($(tns.val) = $lhs_2) end -virtual_bcast(ctx, lvl::VirtualShortCircuitScalar, arch) = lvl +bcast_send(ctx, lvl::VirtualShortCircuitScalar, arch) = lvl function short_circuit_cases(ctx, tns::VirtualShortCircuitScalar, op) [ @@ -359,7 +359,7 @@ virtual_size(ctx, ::VirtualSparseShortCircuitScalar) = () virtual_fill_value(ctx, tns::VirtualSparseShortCircuitScalar) = tns.Vf virtual_eltype(tns::VirtualSparseShortCircuitScalar, ctx) = tns.Tv -virtual_bcast(ctx, lvl::VirtualSparseShortCircuitScalar, arch) = lvl +bcast_send(ctx, lvl::VirtualSparseShortCircuitScalar, arch) = lvl function declare!(ctx, tns::VirtualSparseShortCircuitScalar, init) push_preamble!(