You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## XLA auto-tuner: Results do not match the reference. This is likely a bug/unexpected loss of precision
4
+
5
+
If you see this error with the CUDA backend, use a scoped value to increase the precision
6
+
of the dot-general algorithm.
7
+
8
+
```julia
9
+
Reactant.with_config(; dot_general_precision=PrecisionConfig.HIGH) do
10
+
@compile...
11
+
end
12
+
```
13
+
14
+
For more information, see [this XLA issue](https://github.com/openxla/xla/issues/23934).
15
+
16
+
## Emptying the cache to avoid OOM issues
17
+
18
+
When you encounter OOM (Out of Memory) errors, you can try to clear the cache by using
19
+
Julia's builtin `GC.gc()` between memory-intensive operations.
20
+
21
+
!!! note
22
+
This will only free memory which is not currently live. If the result of compiled
23
+
function was stored in a vector, it will still be alive and `GC.gc()` won't free it.
24
+
25
+
```julia
26
+
using Reactant
27
+
n =500_000_000
28
+
input1 = Reactant.ConcreteRArray(ones(n))
29
+
input2 = Reactant.ConcreteRArray(ones(n))
30
+
31
+
functionsin_add(x, y)
32
+
returnsin.(x) .+ y
33
+
end
34
+
35
+
f =@compilesin_add(input1,input2)
36
+
37
+
for i =1:10
38
+
GC.gc()
39
+
@info"gc... $i"
40
+
f(input1, input2) # May cause OOM here for a 24GB GPU if GC is not used
41
+
end
42
+
```
43
+
44
+
If you **don't** use `GC.gc()` here, this may cause an OOM:
45
+
46
+
```bash
47
+
[ Info: gc... 1
48
+
[ Info: gc... 2
49
+
[ Info: gc... 3
50
+
...
51
+
E0105 09:48:28.755177 110350 pjrt_stream_executor_client.cc:3088] Execution of replica 0 failed: RESOURCE_EXHAUSTED: Out of memory while trying to allocate 4000000000 bytes.
52
+
ERROR: RESOURCE_EXHAUSTED: Out of memory while trying to allocate 4000000000 bytes.
Copy file name to clipboardExpand all lines: docs/src/introduction/index.md
-80Lines changed: 0 additions & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,83 +53,3 @@ f = @compile sinsum_add(input1,input2)
53
53
# one can now run the program
54
54
f(input1, input2)
55
55
```
56
-
57
-
58
-
## Tips
59
-
60
-
### Empty Cache
61
-
62
-
When you encounter OOM (Out of Memory) errors, you can try to clear the cache by using Julia's builtin `GC.gc()` between memory-intensive operations.
63
-
64
-
!!! note
65
-
This will only free memory which is not currently live. If the result of compiled function was stored in a vector, it will still be alive and `GC.gc()` won't free it.
66
-
67
-
```julia
68
-
using Reactant
69
-
n =500_000_000
70
-
input1 = Reactant.ConcreteRArray(ones(n))
71
-
input2 = Reactant.ConcreteRArray(ones(n))
72
-
73
-
functionsin_add(x, y)
74
-
returnsin.(x) .+ y
75
-
end
76
-
77
-
f =@compilesin_add(input1,input2)
78
-
79
-
for i =1:10
80
-
GC.gc()
81
-
@info"gc... $i"
82
-
f(input1, input2) # May cause OOM here for a 24GB GPU if GC is not used
83
-
end
84
-
```
85
-
86
-
If you **don't** use `GC.gc()` here, this may cause an OOM:
87
-
88
-
89
-
90
-
```bash
91
-
[ Info: gc... 1
92
-
[ Info: gc... 2
93
-
[ Info: gc... 3
94
-
...
95
-
E0105 09:48:28.755177 110350 pjrt_stream_executor_client.cc:3088] Execution of replica 0 failed: RESOURCE_EXHAUSTED: Out of memory while trying to allocate 4000000000 bytes.
96
-
ERROR: RESOURCE_EXHAUSTED: Out of memory while trying to allocate 4000000000 bytes.
0 commit comments