Commit 684688a
Optimize VISTA3D (#8123)
Fixes #8122 .
### Description
As shown in [this
PR](Project-MONAI/model-zoo#671), the memory
malloc and mask embedding for-loop are the bottlenecks that caused the
vista3d slow inference. Therefore, this PR fixed them by adding the
logic for malloc and replacing the for-loop with a tensor
multiplication.
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.
Signed-off-by: binliu <[email protected]>
Co-authored-by: Yiheng Wang <[email protected]>
Co-authored-by: YunLiu <[email protected]>1 parent 052dbb4 commit 684688a
2 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
| 511 | + | |
512 | 512 | | |
| 513 | + | |
| 514 | + | |
513 | 515 | | |
514 | 516 | | |
515 | 517 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
| 642 | + | |
| 643 | + | |
646 | 644 | | |
647 | | - | |
| 645 | + | |
648 | 646 | | |
649 | 647 | | |
650 | 648 | | |
| |||
0 commit comments