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
Copy file name to clipboardExpand all lines: lib/syntax_extensions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -392,7 +392,7 @@ type Assignments.t =
392
392
393
393
Schematic example: `~~("space" "separated" "comment" "tensor p debug_name:" p; <scope of the comment>)`. The content of the comment uses application syntax, must be composed of strings, `<tensor>`, `<tensor>.value` (equivalent to `<tensor>`), `<tensor>.grad` components, where `<tensor>` is any tensor expression or tensor identifier.
394
394
395
-
This syntax used to be very important, because comments in assignments are used to derive file names for generated code. Now, the `%cd` syntax automatically introduces block comments for code at let-binding points, using the identifier. However, currently the comment does not yet incorporate any tensor node labels -- and for that reason we are not yet adding comments around function bodies if a function is annotated with `%cd`-- so the `~~` syntax is still helpful when the comment needs to be more precise for debugging or naming purposes, or when `%cd` is not used with a let binding. If an explicit comment is provided at the let-binding level, the automatic one is omitted.
395
+
This syntax used to be very important, because comments in assignments are used to derive file names for generated code. Now, the `%cd` syntax automatically introduces block comments for code at let-binding points, using the identifier. Currently the comment does not yet incorporate any tensor node labels -- and for that reason we are not yet adding comments around function bodies if a function is annotated with `%cd`. Moreover, we only automatically add comments for code, not for tensors -- so the `~~` syntax is still helpful when the comment needs to be more precise for debugging or naming purposes, or when `%cd` is not used with a let binding, or when we want to pass a forward code directly instead of let-binding it. If an explicit comment is provided at the let-binding level, the automatic one is omitted.
0 commit comments