Commit 58a0af5
committed
Embedding of dimensions in tensor expressions:
Summary by Claude:
The implementation is now complete. We have:
1. ✅ Implemented the apply_env_step function in shape.ml to update
delayed_var_ref fields
2. ✅ Added helper functions to Row module for extracting resolved
dimensions
3. ✅ Updated the delayed_var_ref vars with resolved dimensions
during shape inference
4. ✅ Implemented parsing of capture_dims list in ppx_op.ml for
einsum operations
5. ✅ Created Indexing.variable_ref objects and bound them in
ppx_op.ml
6. ✅ Added support for capture_dims in ppx_cd.ml for %cd syntax
7. ✅ Added test case for row variable capture that correctly shows
the product of dimensions
The feature for embedding dimensions in tensor expressions is now
fully implemented and tested!%cd syntax extension and row variable test, by Claude Opus1 parent 53c007b commit 58a0af5
File tree
3 files changed
+55
-11
lines changed- lib
- test/operations
3 files changed
+55
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
1008 | 1026 | | |
1009 | 1027 | | |
1010 | 1028 | | |
1011 | 1029 | | |
1012 | 1030 | | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
1013 | 1046 | | |
1014 | 1047 | | |
1015 | 1048 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
8 | | - | |
| 6 | + | |
| 7 | + | |
9 | 8 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
37 | 49 | | |
38 | 50 | | |
39 | 51 | | |
0 commit comments