Skip to content

Commit a63ae71

Browse files
committed
final doc tweaks
1 parent bdadc54 commit a63ae71

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

docs/make.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ makedocs(; modules=[TensorOperations],
99
"Manual" => ["man/indexnotation.md",
1010
"man/functions.md",
1111
"man/interface.md",
12-
"man/implementation.md",
13-
"man/autodiff.md"],
12+
"man/autodiff.md",
13+
"man/implementation.md"],
1414
"Index" => "index/index.md"])
1515

1616
# Documenter can also automatically deploy documentation to gh-pages.

docs/src/man/indexnotation.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,9 @@ implementation that is used for e.g. arrays with an `eltype` that is not
408408
permutations, but still in a cache-friendly and multithreaded way (again relying on
409409
`JULIA_NUM_THREADS > 1`). This implementation can also be used for `BlasFloat` types (but
410410
will typically be slower), and the use of BLAS can be controlled by explicitly switching the
411-
backend between `StridedBLAS` and `StridedNative`. Similarly, when different allocation
412-
strategies are available, their backend can be controlled with the `allocator` keyword.
411+
backend between `StridedBLAS` and `StridedNative` using the `backend` keyword to
412+
[`@tensor`](@ref). Similarly, different allocation strategies, when available, can be
413+
selected using the `allocator` keyword of [`@tensor`](@ref).
413414

414415
The primitive tensor operations are also implemented for `CuArray` objects of the
415416
[CUDA.jl](https://github.com/JuliaGPU/CUDA.jl) library. This implementation is essentially a

src/indexnotation/tensormacros.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ Additional keyword arguments may be passed to control the behavior of the parser
2828
- `contractcheck`:
2929
Boolean flag to enable runtime check for contractibility of indices with clearer error messages.
3030
- `costcheck`:
31-
Adds runtime checks to ensure that the contraction order is optimal. Can be either `:warn` or `:cache`. The former will issues warnings when sub-optimal expressions are encountered, while the latter will cache the optimal contraction order for each tensor site and calling site.
31+
Can be either `:warn` or `:cache` and adds runtime checks to compare the compile-time contraction order to the optimal order computed for the actual run time tensor costs.
32+
If `costcheck == :warn`, warnings are printed for every sub-optimal contraction that is encountered.
33+
If `costcheck == :cache`, only the most costly run of a particular sub-optimal contraction will be cached in `TensorOperations.costcache`.
34+
In both cases, a suggestion for the `order` keyword argument is computed to switch to the optimal contraction order.
3235
- `backend`:
33-
Inserts a backend call for the different tensor operations.
36+
Inserts an implementation backend as a final argument in the different tensor operation calls in the generated code.
3437
- `allocator`:
35-
Inserts a backend call for the different tensor allocations.
38+
Inserts an allocation strategy as a final argument in the tensor allocation calls in the generated code.
3639
"""
3740
macro tensor(args::Vararg{Expr})
3841
isempty(args) && throw(ArgumentError("No arguments passed to `@tensor`"))

0 commit comments

Comments
 (0)