Skip to content
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ TensorOperationscuTENSORExt = "cuTENSOR"
TensorOperationsJLArraysExt = "JLArrays"

[compat]
AMDGPU = "2"
AMDGPU = "2.8"
Aqua = "0.6, 0.7, 0.8"
Adapt = "4"
Bumper = "0.6, 0.7"
Expand Down
4 changes: 4 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ The TensorOperations.jl package is centered around the following features:
[CUDA.jl and cuTENSOR.jl](https://github.com/JuliaGPU/CUDA.jl), by relying on (and thus
providing a high level interface into) NVidia's
[cuTENSOR](https://developer.nvidia.com/cutensor) library.
- Support for `ROCArray` objects if used together with
[AMDGPU.jl and hipTENSOR](https://github.com/JuliaGPU/AMDGPU.jl), by relying on (and thus
providing a high level interface into) AMD's
[hipTENSOR](https://rocm.docs.amd.com/projects/hipTensor/en/latest/index.html) library.
- Fall-back support for `AbstractArray` instances which are not strided, by using a
general implementation using only constructions from Julia's `Base` and `LinearAlgebra`
modules (`reshape`, `permutedims`, `mul!`, etc.) and some indexing in the case of
Expand Down
19 changes: 10 additions & 9 deletions docs/src/man/indexnotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,16 +471,17 @@ simple wrapper over the cuTENSOR library of NVidia, and will only be loaded when
`cuTENSOR.jl` package is loaded. The `@tensor` macro will then automatically work for
operations between GPU arrays.

Mixed operations between host arrays (e.g. `Array`) and device arrays (e.g. `CuArray`) will
fail. However, if one wants to harness the computing power of the GPU to perform all tensor
operations, there is a dedicated macro `@cutensor`. This will transfer all host arrays to
the GPU before performing the requested operations. If the output is an existing host array,
the result will be copied back. If a new result array is created (i.e. using `:=`), it will
remain on the GPU device and it is up to the user to transfer it back. Arrays are transfered
to the GPU just before they are first used, and in a complicated tensor expression, this
might have the benefit that transer of the later arrays overlaps with computation of earlier
operations.
Mixed operations between host arrays (e.g. `Array`) and device arrays (e.g. `CuArray` or `ROCArray`)
will fail. However, if one wants to harness the computing power of the GPU to perform all tensor
operations, there is a dedicated macro `@cutensor` for CUDA devices, or `@hiptensor` for AMD.
This will transfer all host arrays to the GPU before performing the requested operations.
If the output is an existing host array, the result will be copied back.
If a new result array is created (i.e. using `:=`), it will remain on the GPU device and it
is up to the user to transfer it back. Arrays are transfered to the GPU just before they are
first used, and in a complicated tensor expression, this might have the benefit that transer
of the later arrays overlaps with computation of earlier operations.

```@docs
@cutensor
@hiptensor
```
Loading
Loading