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
@@ -56,7 +56,7 @@ Improved the last-ditch effort to extract the module name from a stack frame. No
56
56
57
57
### Added
58
58
59
-
Event limit in logger works: set `maxLogs` to control how many events get logged. FloatTracker stops collecting stack traces after this, so should run much faster once the threshold has been hit. Defaults to `Unbounded()`.
59
+
Event limit in logger works: set `maxLogs` to control how many events get logged. TrackedFloats stops collecting stack traces after this, so should run much faster once the threshold has been hit. Defaults to `Unbounded()`.
⚠️ **NOTICE** ⚠️ we are in the process of renaming FloatTracker → TrackedFloats to bring this inline with Julia package naming conventions. Please be patient.
Track `NaN` and `Inf` generation and propagation in your code.
6
8
7
-
Available on [JuliaHub](https://juliahub.com/ui/Packages/FloatTracker/dBXig/1.0.0)
9
+
Available on [JuliaHub](https://juliahub.com/ui/Packages/TrackedFloats/dBXig/1.0.0)
8
10
9
11
# Synopsis
10
12
11
13
```julia
12
-
# Pull in FloatTracker
13
-
usingFloatTracker
14
+
# Pull in TrackedFloats
15
+
usingTrackedFloats
14
16
15
17
# Wrap inputs in a TrackedFloat* type
16
18
num =TrackedFloat64(-42.0)
17
19
18
20
# Watch as a NaN gets born
19
21
should_be_nan =sqrt(num)
20
22
21
-
# Flush FloatTracker's logs
23
+
# Flush TrackedFloats's logs
22
24
ft_flush_logs()
23
25
```
24
26
25
27
# Description
26
28
27
-
`FloatTracker.jl` is a library that provides three new types: `TrackedFloat16`, `TrackedFloat32`, and `TrackedFloat64`.
29
+
`TrackedFloats.jl` is a library that provides three new types: `TrackedFloat16`, `TrackedFloat32`, and `TrackedFloat64`.
28
30
These behave just like their `FloatN` counterparts except that they detect and log instances of exceptional floating point values. (E.g. `NaN` or `Inf`)
29
31
30
32
There are three kinds of events that can happen during the lifetime of an exceptional floating point value:
@@ -81,13 +83,13 @@ One uses the builtin `<` operator and the other uses Julia's `max` function. Whe
81
83
82
84
Note that the result of this program is *wrong*: instead of the true maximum value of the list (`5.0`) getting returned, the bad version returns `4.0`!
83
85
84
-
We can see this in the log that produced by FloatTracker when running this file.
86
+
We can see this in the log that produced by TrackedFloats when running this file.
85
87
86
88
```
87
-
[NaN] check_error at /Users/ashton/.julia/dev/FloatTracker/src/TrackedFloat.jl:11
88
-
< at /Users/ashton/.julia/dev/FloatTracker/src/TrackedFloat.jl:214
89
-
maximum at /Users/ashton/Research/FloatTrackerExamples/max_example.jl:0
90
-
top-level scope at /Users/ashton/Research/FloatTrackerExamples/max_example.jl:20
89
+
[NaN] check_error at /Users/ashton/.julia/dev/TrackedFloats/src/TrackedFloat.jl:11
90
+
< at /Users/ashton/.julia/dev/TrackedFloats/src/TrackedFloat.jl:214
91
+
maximum at /Users/ashton/Research/TrackedFloatsExamples/max_example.jl:0
92
+
top-level scope at /Users/ashton/Research/TrackedFloatsExamples/max_example.jl:20
91
93
eval at ./boot.jl:370
92
94
include_string at ./loading.jl:1899
93
95
_include at ./loading.jl:1959
@@ -103,11 +105,11 @@ This tool may be useful for debugging those sorts of issues.
103
105
104
106
## Usage
105
107
106
-
1. Call `using FloatTracker`; you may want to include functions like `enable_nan_injection` or `config_logger` or the like. (See below for more details.)
108
+
1. Call `using TrackedFloats`; you may want to include functions like `enable_nan_injection` or `config_logger` or the like. (See below for more details.)
107
109
2. Add additional customization to logging and injection.
108
110
3. Wrap as many of your inputs in `TrackedFloatN` as you can.
109
111
110
-
FloatTracker should take care of the rest!
112
+
TrackedFloats should take care of the rest!
111
113
112
114
Digging into step 2, there are two things that you can customize after initialization:
113
115
@@ -163,7 +165,7 @@ Keyword arguments for `config_logger`:
163
165
164
166
### Configuring the injector
165
167
166
-
FloatTracker can *inject*`NaN`s at random points in your program to help you find places where you might not be handling exceptional values properly: this technique can help you find `NaN` kills before they happen in a production environment.
168
+
TrackedFloats can *inject*`NaN`s at random points in your program to help you find places where you might not be handling exceptional values properly: this technique can help you find `NaN` kills before they happen in a production environment.
167
169
168
170
```julia
169
171
# Inject 2 NaNs
@@ -218,7 +220,7 @@ Most of the time comparison operators are what kill a NaN. But `^` can kill NaNs
218
220
219
221
# Fuzzing and Recording injections
220
222
221
-
FloatTracker allows you to fuzz code and inject NaNs or Infs wherever a `TrackedFloat` type is used. Moreover, you can record these injections to rerun injections.
223
+
TrackedFloats allows you to fuzz code and inject NaNs or Infs wherever a `TrackedFloat` type is used. Moreover, you can record these injections to rerun injections.
222
224
223
225
**WARNING:** it is critical that inputs to the program be exactly the same for recording and replaying to be consistent. The recordings are sensitive to the number of times a floating point operation is hit.
224
226
@@ -235,7 +237,7 @@ The checks in the purple region cost the most time, so we do those as late as po
235
237
236
238
Sometimes we want to inject NaNs throughout the program. We can create a "recording session" that will before each injection check if that point has been tried before. If it has, we move on and try again at the next injection point.
237
239
238
-
We can tell FloatTracker what we consider to be identical injection points. **TODO:** how *do* we tell FloatTracker what we consider to be the same and not the same? Function boundaries?
240
+
We can tell TrackedFloats what we consider to be identical injection points. **TODO:** how *do* we tell TrackedFloats what we consider to be the same and not the same? Function boundaries?
239
241
240
242
## Recording internals
241
243
@@ -247,13 +249,13 @@ Injection points are saved to a *recording file*, where each line denotes an inj
The first field `42` is the injection point, or the nth time a floating point operation was intercepted by FloatTracker. The second field `solve.jl` acts as a little sanity check: this is the first non-FloatTracker file off of the stack trace. After that comes a list of module names paired with the function on the call stack.
252
+
The first field `42` is the injection point, or the nth time a floating point operation was intercepted by TrackedFloats. The second field `solve.jl` acts as a little sanity check: this is the first non-TrackedFloats file off of the stack trace. After that comes a list of module names paired with the function on the call stack.
251
253
252
254
# Generating CSTGs
253
255
254
256
Get the [CSTG](https://github.com/utahplt/cstg) code.
255
257
256
-
Run a program that uses TrackedFloats (e.g. from the [example repository](https://github.com/utahplt/FloatTrackerExamples)).
258
+
Run a program that uses TrackedFloats (e.g. from the [example repository](https://github.com/utahplt/TrackedFloatsExamples)).
257
259
By default, a file with `*error_log*` in its name should appear.
258
260
259
261
Generate a graph using the error log:
@@ -272,13 +274,13 @@ For more about CSTG, please see the original paper:
272
274
273
275
# Examples
274
276
275
-
Examples have been moved from this repository to an [example repository](https://github.com/utahplt/FloatTrackerExamples)—this allows us to keep the dependencies in this repository nice and light.
277
+
Examples have been moved from this repository to an [example repository](https://github.com/utahplt/TrackedFloatsExamples)—this allows us to keep the dependencies in this repository nice and light.
276
278
277
279
# Julia and GPU programming
278
280
279
-
FloatTracker works on the CPU. If a Julia function calls a GPU kernel, then you can track exceptions inside the GPU execution using our companion tool [GPU-FPX](https://github.com/LLNL/GPU-FPX) developed by Xinyi Li for her PhD. This will allow you to (1) see the exception flows inside the kernel, (2) whether the exceptions got killed inside the kernel, and if the exceptions were present in the return result of the Julia GPU call, then (3) FloatTracker will show how that exception further flows through the Julia code. You get this full effect by running your Julia Command under `LD_PRELOAD`.
281
+
TrackedFloats works on the CPU. If a Julia function calls a GPU kernel, then you can track exceptions inside the GPU execution using our companion tool [GPU-FPX](https://github.com/LLNL/GPU-FPX) developed by Xinyi Li for her PhD. This will allow you to (1) see the exception flows inside the kernel, (2) whether the exceptions got killed inside the kernel, and if the exceptions were present in the return result of the Julia GPU call, then (3) TrackedFloats will show how that exception further flows through the Julia code. You get this full effect by running your Julia Command under `LD_PRELOAD`.
280
282
281
-
For details of `LD_PRELOAD` and to obtain and install GPU-FPX, please visit the [GPU-FPX repository](https://github.com/LLNL/GPU-FPX) and ask its authors for assistance if needed. For help on using FloatTracker in conjunction with this tool, talk to us.
283
+
For details of `LD_PRELOAD` and to obtain and install GPU-FPX, please visit the [GPU-FPX repository](https://github.com/LLNL/GPU-FPX) and ask its authors for assistance if needed. For help on using TrackedFloats in conjunction with this tool, talk to us.
282
284
283
285
# Running tests
284
286
@@ -293,7 +295,7 @@ or via the Julia shell:
293
295
```
294
296
julia> ] # enter the package shell
295
297
pkg> activate .
296
-
(FloatTracker) pkg> test
298
+
(TrackedFloats) pkg> test
297
299
```
298
300
299
301
# License
@@ -304,7 +306,7 @@ MIT License
304
306
305
307
Inspired by [Sherlogs.jl](https://github.com/milankl/Sherlogs.jl).
306
308
307
-
This repository originally lived in [Taylor Allred's repository](https://github.com/tcallred/FloatTracker.jl).
309
+
This repository originally lived in [Taylor Allred's repository](https://github.com/tcallred/TrackedFloats.jl).
0 commit comments