-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aten roi align #209
Open
bpickrel
wants to merge
19
commits into
master
Choose a base branch
from
aten_roi_align
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+176
−5
Open
Aten roi align #209
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1411f57
continued work in progress
bpickrel 37d94bf
work in progress. Now passes first test.
bpickrel 409995a
Addded support for multiple roi input of form Tensor[K, 5]. input[0]…
bpickrel 409e272
fixed some calling parameters in roi_align converter and added test_z…
bpickrel 364a9a4
Merge remote-tracking branch 'origin/master' into aten_roi_align
bpickrel 35574c6
work in progress, dealing with runtime test HIP bug
bpickrel f733fca
faster migraphx make
bpickrel e407df1
work in progress; passes tests but needs more checking
bpickrel 20505d2
work in progress, adding dynamo test
bpickrel fdfb804
corrected acc converter to correctly handle test inputs with differen…
bpickrel 254e278
comment
bpickrel c1ecd63
Merge branch 'master' into aten_roi_align
bpickrel 8feba94
fixed the aten version of test_roialign; now passes
bpickrel 2669861
changed default arguments to various roialign functions, cleaned up s…
bpickrel 2e9b68e
comment cleanup
bpickrel f4699d4
Merge branch 'master' into aten_roi_align
shivadbhavsar 0fb081f
Added wrappings for torchvision dependencies, moved new tests to diff…
bpickrel 0acc107
Merge branch 'aten_roi_align' of github.com:ROCm/torch_migraphx into …
bpickrel 9f6c4ea
format
bpickrel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
import pytest | ||
import torch | ||
from dynamo_test_utils import FuncModule, MultiInFuncModule, FuncModuleFirstOut, convert_to_mgx, verify_outputs | ||
import torch_migraphx | ||
import sys | ||
try: | ||
import torchvision | ||
except ImportError: | ||
pass | ||
|
||
@pytest.mark.skipif('torchvision' not in sys.modules, | ||
reason="requires the torchvision library") | ||
@pytest.mark.parametrize('op_alias', [torch.ops.torchvision.roi_align.default]) | ||
@pytest.mark.parametrize("spatial_scale, sampling_ratio", [(1.5, 3), (0.5, 2)]) | ||
@pytest.mark.parametrize("aligned", [(True), (False)]) | ||
@pytest.mark.parametrize( | ||
"input, boxes, output_size", [((1, 2, 3, 4), ([[0, 1.1, 1.2, 0.6, 2.6]]), [2, 3]), | ||
# boxes as List[Tensor[L, 4]] is not supported | ||
############# ((2, 2, 3, 3), ([(1.1, 1.2, 0.6, 2.6), (1.13, 1.23, 0.63, 2.63)]), [2, 2]), | ||
((2, 2, 3, 4), ([[1, 1.1, 1.2, 0.6, 2.6], [0, 1.13, 1.23, 0.63, 2.63]]), [5, 2]), | ||
((4, 5, 256, 256), | ||
([[0, 10.6, 11.2, 21.1, 22.6], | ||
[2, 10.63, 11.23, 21.63, 22.63], | ||
[3, 10.64, 11.23, 21.67, 22.63], | ||
[1, 10.65, 11.23, 21.68, 22.63], | ||
]), | ||
[7, 6]) | ||
] | ||
) | ||
def test_roialign(op_alias, input, boxes, output_size, spatial_scale, sampling_ratio, aligned): | ||
assert(input[0] == len(boxes)) | ||
inp = torch.randn(input).cuda() | ||
roi = torch.tensor(boxes).cuda() | ||
|
||
mod = MultiInFuncModule(op_alias, spatial_scale, output_size[0], output_size[1], sampling_ratio, aligned) | ||
mgx_mod = convert_to_mgx(mod, [inp, roi]) | ||
verify_outputs(mod, mgx_mod, [inp, roi]) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we don't want to use the multithread flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well usually the number you set depends on the system. Also, the rbuild command does the building part here (which i think is multithreaded?), the make install just copies the files over to opt/rocm and so multithreading that doesnt much of a difference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During debugging, it did trigger substantial rebuilding each time I changed a converter.
I don't think the actual number of threads requested matters much as long as it's more than 1.