Skip to content

Commit 04c8428

Browse files
authored
change info message to only appear during precompilation (#217)
1 parent 6fa0c01 commit 04c8428

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "TensorOperations"
22
uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
33
authors = ["Lukas Devos <[email protected]>", "Maarten Van Damme <[email protected]>", "Jutho Haegeman <[email protected]>"]
4-
version = "5.2.1"
4+
version = "5.3.0"
55

66
[deps]
77
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"

src/TensorOperations.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,6 @@ 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
9278
return nothing
9379
end
9480

src/precompile.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,18 @@ if workload_enabled()
123123
precompile(tensoralloc_contract, (T, A, pA, Bool, B, pB, Bool, pAB, Val{false}))
124124
end
125125
end
126+
else
127+
@info """
128+
TensorOperations can optionally be instructed to precompile several functions, which can be used to reduce the time to first execution (TTFX).
129+
This is disabled by default as this can take a while on some machines, and is only relevant for contraction-heavy workloads.
130+
131+
To enable or disable precompilation, you can use the following script:
132+
133+
```julia
134+
using TensorOperations, Preferences
135+
set_preferences!(TensorOperations, "precompile_workload" => true; force=true)
136+
```
137+
138+
This will create a `LocalPreferences.toml` file next to your current `Project.toml` file to store this setting in a persistent way.
139+
"""
126140
end

0 commit comments

Comments
 (0)