Skip to content

Commit 20360c0

Browse files
committed
Added minimal docs.
- The newly introduced CLI args are not documented in RunningDaphneLocally.md, because the new feature is experimental and not the first thing we want users to look at. - Instead, added a minimal page in the developer docs.
1 parent 72f7de6 commit 20360c0

File tree

4 files changed

+42
-8
lines changed

4 files changed

+42
-8
lines changed

doc/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
* [Creating release artifacts](ReleaseScripts.md)
2525
* [Maintaining GPG signing keys](GPG-signing-keys.md)
26+
* [Recording Data Properties](/doc/development/PropertyRecording.md)
2627

2728
### How-tos and Guidelines
2829

doc/RunningDaphneLocally.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,6 @@ Note that some of the more specific options are described in the documentation p
8080
8181
Turns on the automatic selection of a suitable matrix representation (currently dense or sparse (CSR)). *Experimental feature.*
8282
83-
- **`--enable_property_recording`**
84-
85-
Enables recording of certain properties (currently only sparsity) from all matrix result objects in the Intermediate Representation (IR). The recorded properties are saved in a JSON file named properties.json located in the root directory of Daphne.
86-
87-
- **`--enable_property_insert`** and **`--properties_file_path=<path/to/propertiesFile>`**
88-
89-
Allows the insertion of previously recorded properties into operations with matrix results from a JSON file. By default, the file used is properties.json in the Daphne root directory. Optionally, a different file can be specified using the `--properties_file_path` argument.
90-
9183
## Return Codes
9284
9385
If `daphne` terminates normally, one of the following status codes is returned:
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--
2+
Copyright 2025 The DAPHNE Consortium
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
17+
# Recording Data Properties
18+
19+
There is an experimental feature for recording the true data properties of intermediate results at run-time and re-inserting them in a subsequent run of DAPHNE.
20+
21+
By default, this feature is turned off.
22+
Recording data properties can be turned on by invoking `daphne` with `--enable-property-recording`.
23+
Inserting data properties recorded in a previous execution of `daphne` can be turned on with `--enable-property-insert`.
24+
These two options are mutually exclusive.
25+
The recorded true data properties are stored to/loaded from a simple JSON file whose path is specified by `--properties-file-path` (default: `properties.json`).
26+
See also `daphne --help` for some help on these options.
27+
28+
## Possible Uses of this Feature
29+
30+
- Recording: Detailed insights into the data properties of intermediate results to find potential for optimizations by exploiting these data properties.
31+
- Insertion: Find out how DAPHNE performs when it has precise knowledge of the true data properties (no unknowns, no inaccurate compile-time estimates).
32+
- ...
33+
34+
## Current Limitations
35+
36+
- Only one data property is recorded: sparsity; more properties could be added in the future.
37+
- Only matrix-typed intermediate results are considered; scalars and frames could be added in the future.
38+
- Only intermediates produced in the `main` function of DaphneIR are considered; intermediates inside UDFs could be considered in the future.
39+
- Control-flow constructs like if-then-else and loops are viewed as black boxes, i.e., the data properties of their results are recorded/inserted, but not those of intermediates created *inside* these constructs; in the future, we could consider those, too.
40+
- ...

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,4 @@ nav:
8181
- development/WriteDocs.md
8282
- development/Testing.md
8383
- development/InstallPythonLibsInContainer.md
84+
- development/PropertyRecording.md

0 commit comments

Comments
 (0)