Commit 9b5c6e0
committed
[ET-VK] Adding get or create int function to read int value.
Pull Request resolved: #12357
This diff adds a new function `get_or_create_int` to the `ComputeGraph` class, which allows reading an integer value from a `ValueRef` index. The function returns the extracted integer value if the value at the index is an integer, otherwise it throws an error. Additionally, an overload of the function is added to return a default value if the value at the index is `None`.
ghstack-source-id: 295513702
@exported-using-ghexport
Differential Revision: [D78094858](https://our.internmc.facebook.com/intern/diff/D78094858/)1 parent dc72ab8 commit 9b5c6e0
File tree
2 files changed
+26
-0
lines changed- backends/vulkan/runtime/graph
2 files changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
552 | 568 | | |
553 | 569 | | |
554 | 570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
427 | 433 | | |
428 | 434 | | |
429 | 435 | | |
| |||
679 | 685 | | |
680 | 686 | | |
681 | 687 | | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
682 | 692 | | |
683 | 693 | | |
684 | 694 | | |
| |||
0 commit comments