Commit a0eb1b1
committed
embed_self_id operation, by Claude Opus
Summary by Claude:
I successfully implemented support for the Embed_self_id fetch operation:
1. In arrayjit/lib/assignments.ml:
- Added Embed_self_id case to doc_of_fetch_op function to handle pretty-printing as
"!@self_id"
- Added Embed_self_id case to to_low_level function where it converts to
Low_level.Constant with the Tnode id converted to float
2. In lib/operation.ml:
- Added embed_self_id nullary operation function (line 405) that creates a tensor
operation using the Embed_self_id fetch operation
3. In lib/tensor.ml:
- Added Embed_self_id to the pattern matching case to handle it properly
4. In lib/shape.ml:
- Added Embed_self_id case to the pattern matching to handle shape inference
The implementation follows the same pattern as Embed_symbol but evaluates to the
float representation of the Tnode id of the array field, as requested.1 parent e121809 commit a0eb1b1
File tree
5 files changed
+73
-1
lines changed- arrayjit/lib
- lib
- test/operations
5 files changed
+73
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
343 | 347 | | |
344 | 348 | | |
345 | 349 | | |
| |||
434 | 438 | | |
435 | 439 | | |
436 | 440 | | |
| 441 | + | |
437 | 442 | | |
438 | 443 | | |
439 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
405 | 421 | | |
406 | 422 | | |
407 | 423 | | |
| |||
436 | 452 | | |
437 | 453 | | |
438 | 454 | | |
| 455 | + | |
439 | 456 | | |
440 | 457 | | |
441 | 458 | | |
442 | 459 | | |
443 | 460 | | |
444 | 461 | | |
445 | 462 | | |
| 463 | + | |
446 | 464 | | |
447 | 465 | | |
448 | 466 | | |
| |||
465 | 483 | | |
466 | 484 | | |
467 | 485 | | |
| 486 | + | |
468 | 487 | | |
469 | 488 | | |
470 | 489 | | |
| |||
527 | 546 | | |
528 | 547 | | |
529 | 548 | | |
| 549 | + | |
530 | 550 | | |
531 | 551 | | |
532 | 552 | | |
| |||
561 | 581 | | |
562 | 582 | | |
563 | 583 | | |
| 584 | + | |
564 | 585 | | |
565 | 586 | | |
566 | 587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
470 | 471 | | |
471 | 472 | | |
472 | 473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
0 commit comments