Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
willow-ahrens committed Feb 6, 2025
1 parent a509212 commit 311c781
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions docs/src/docs/internals/parallel.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ get_device
get_parent_task
```

## Data Movement
## Data Transfer

Before entering a parallel loop, a tensor may reside on a single task, or
represent a single view of data distributed across multiple tasks, or represent
Expand Down Expand Up @@ -59,4 +59,4 @@ scatter_recv
gather
gather_send
gather_recv
```
```
16 changes: 0 additions & 16 deletions src/abstract_tensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,6 @@ function similar in spirit to `Base.resize!`.
"""
function virtual_resize! end

"""
moveto(arr, device)
If the array is not on the given device, it creates a new version of this array on that device
and copies the data in to it, according to the `device` trait.
"""
function moveto end

"""
virtual_moveto(device, arr)
If the virtual array is not on the given device, copy the array to that device. This
function may modify underlying data arrays, but cannot change the virtual itself. This
function is used to move data to the device before a kernel is launched.
"""
function virtual_moveto end

struct LabelledTree
key
Expand Down
17 changes: 17 additions & 0 deletions src/architecture.jl
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,20 @@ function virtual_parallel_region(f, ctx, device::VirtualCPU)
end
end
end

"""
moveto(arr, device)
If the array is not on the given device, it creates a new version of this array on that device
and copies the data in to it, according to the `device` trait.
"""
function moveto end

"""
virtual_moveto(device, arr)
If the virtual array is not on the given device, copy the array to that device. This
function may modify underlying data arrays, but cannot change the virtual itself. This
function is used to move data to the device before a kernel is launched.
"""
function virtual_moveto end

0 comments on commit 311c781

Please sign in to comment.