Changed bnns tests to support RPC tracker and integrate them into CI#9
Open
KJlaccHoeUM9l wants to merge 10 commits intomainfrom
Open
Changed bnns tests to support RPC tracker and integrate them into CI#9KJlaccHoeUM9l wants to merge 10 commits intomainfrom
KJlaccHoeUM9l wants to merge 10 commits intomainfrom
Conversation
apeskov
requested changes
May 18, 2021
| X64_X86 = 0 | ||
| ARM64 = 1 | ||
|
|
||
| connection_type = ConnectionType("local") |
|
|
||
|
|
||
| def update_lib(lib, device, cross_compile): | ||
| def update_lib(lib, device, cross_compile, lib_export_type): |
There was a problem hiding this comment.
We may remove cross_compile args for our cases.
| if lib_export_type != Device.LibExportType.ARM64 and cross_compile: | ||
| lib.export_library(lib_path, cc=cross_compile) | ||
| if lib_export_type == Device.LibExportType.ARM64: | ||
| lib.export_library(lib_path, xcode.create_dylib, arch="arm64", sdk="iphoneos") |
There was a problem hiding this comment.
move this branch into details of Device object.
The first way is:
lib.export_library(lib_path, _device.fcompile, _device.fcompile_kwargs)
The second way:
lib.export_library(lib_path, _device.fcompile)
***
def my_create_dylib(output, objects, *kwargs):
xcode.create_dylib(output, objects, arch="arm64", sdk="phones", **kwargs)
_device.fcompile = my_create_dylib
| """Skip test if it requires the BNNS codegen and it's not present.""" | ||
| if not tvm.get_global_func("relay.ext.bnns", True): | ||
| print("Skip because BNNS codegen is not available.") | ||
| def have_device_and_tracker_variables(): |
There was a problem hiding this comment.
I suggest to move this check into Device class object. Like a Device.is_tracker_compatible()
| cls.device_key = os.environ[Device.EnvironmentVariables.TVM_REMOTE_DEVICE_KEY.value] | ||
|
|
||
| cls.target = "llvm -mtriple=arm64-apple-darwin" | ||
| cls.lib_export_type = Device.LibExportType.ARM64 |
There was a problem hiding this comment.
Move lib_export_type, target and connection_type to instance field.
Initialisation of all other move to constructor of class object.
| return [Device.ConnectionType.LOCAL, Device.ConnectionType.TRACKER] | ||
|
|
||
|
|
||
| def skip_complexity_test(): |
There was a problem hiding this comment.
Can be formulated as special decorator
Author
|
CI with these fixes: https://github.com/OctoML-NN-team/ci-scripts/runs/2620194855?check_suite_focus=true |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Last run of CI with these changes: https://github.com/OctoML-NN-team/ci-scripts/runs/2609378094?check_suite_focus=true