Commit 1e63830
committed
[ET-VK] Adding extract_scalar_or function to extract scalar value or return a default if value at index is none.
Pull Request resolved: #12357
This diff adds a new function `extract_scalar_or` to the `ComputeGraph` class, which extracts a scalar value from a `ValueRef` index. If the value at the index is `None`, it returns a default value.
ghstack-source-id: 296087802
@exported-using-ghexport
Differential Revision: [D78094858](https://our.internmc.facebook.com/intern/diff/D78094858/)1 parent 0dd42c4 commit 1e63830
1 file changed
+15
-0
lines changed| 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 | | |
| |||
439 | 445 | | |
440 | 446 | | |
441 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
442 | 457 | | |
443 | 458 | | |
444 | 459 | | |
| |||
0 commit comments