-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: Update neo multiversion support to include edge devices #3875
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
Merged
Merged
Changes from all commits
Commits
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 hidden or 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 |
---|---|---|
|
@@ -69,6 +69,17 @@ | |
|
||
NEO_IOC_TARGET_DEVICES = ["ml_c4", "ml_c5", "ml_m4", "ml_m5", "ml_p2", "ml_p3", "ml_g4dn"] | ||
|
||
NEO_MULTIVERSION_UNSUPPORTED = [ | ||
"imx8mplus", | ||
"jacinto_tda4vm", | ||
"coreml", | ||
"sitara_am57x", | ||
"amba_cv2", | ||
"amba_cv22", | ||
"amba_cv25", | ||
"lambda", | ||
] | ||
|
||
|
||
class ModelBase(abc.ABC): | ||
"""An object that encapsulates a trained model. | ||
|
@@ -836,11 +847,14 @@ def multi_version_compilation_supported( | |
multi_version_frameworks_support_mapping = { | ||
"inferentia": ["pytorch", "tensorflow", "mxnet"], | ||
"neo_ioc_targets": ["pytorch", "tensorflow"], | ||
"neo_edge_targets": ["pytorch", "tensorflow"], | ||
} | ||
if target_instance_type in NEO_IOC_TARGET_DEVICES: | ||
return framework in multi_version_frameworks_support_mapping["neo_ioc_targets"] | ||
if target_instance_type == "ml_inf1": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will trainium and inferentia2 support multi version too? It probably doesn't matter now. We may want to change it after they get released |
||
return framework in multi_version_frameworks_support_mapping["inferentia"] | ||
if target_instance_type not in NEO_MULTIVERSION_UNSUPPORTED: | ||
return framework in multi_version_frameworks_support_mapping["neo_edge_targets"] | ||
return False | ||
|
||
if multi_version_compilation_supported(target_instance_type, framework, framework_version): | ||
|
This file contains hidden or 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
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.
Curious which edge targets do we want to support?
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.
https://docs.aws.amazon.com/sagemaker/latest/dg/neo-supported-devices-edge-devices.html