Skip to content

Commit c650a93

Browse files
committed
Add precompilation message
1 parent 8c8f70c commit c650a93

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/TensorOperations.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ const costcache = LRU{Any,Any}(; maxsize=10^5)
7575
using PackageExtensionCompat
7676
function __init__()
7777
@require_extensions
78+
79+
@info """
80+
TensorOperations can optionally be instructed to precompile several functions, which can be used to reduce the time to first execution (TTFX).
81+
This is disabled by default as this can take a while on some machines, and is only relevant for contraction-heavy workloads.
82+
83+
To enable or disable precompilation, you can use the following script:
84+
85+
```julia
86+
using TensorOperations, Preferences
87+
set_preferences!(TensorOperations, "precompile_workload" => true; force=true)
88+
```
89+
90+
This will create a `LocalPreferences.toml` file next to your current `Project.toml` file to store this setting in a persistent way.
91+
""" maxlog = 1
7892
end
7993

8094
include("precompile.jl")

0 commit comments

Comments
 (0)