-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
µTVM RPC server and Part 1 of AutoTVM compilation infrastructure #6334
Merged
Merged
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
2e5923c
initial commit of RPC server
areusch a453f67
add session tests
areusch 4353dd4
add python compilation infra
areusch 2818ff9
rm illegal file names
areusch 438d5a9
fix lint
areusch d9c92d8
git-clang-format
areusch b0163a2
pylint
areusch 112f551
make work again
areusch 33b0e81
asf header
areusch 11f4156
git-clang-format
areusch 716e3c4
Merge remote-tracking branch 'tvm/master' into utvm-rpc-server-merge
areusch 97581ac
cppdocs
areusch 144e7ec
stop using list(TRANSFORM ...) in cmake
areusch 675e5fd
split session start packet into start init and start reply
areusch 4f4b808
remove debug messages, fix tests
areusch 726b699
git-clang-format
areusch 9278407
add terminate session message and test reset flow
areusch 451f447
git-clang-format
areusch a0d8ed5
pylint
areusch 0dff0a0
fix path dependencies when using make
areusch abb6cf5
fix test building on linux
areusch cc448a1
git-clang-format
areusch 9777728
add missing file
areusch 11feb64
git-clang-format
areusch 51a1888
fix type pun error
areusch ec43c72
rm old micro runtime test
areusch 06288ee
fix posix_popen_server test
areusch 973ab58
retrigger CI
areusch 27e6aa1
Merge remote-tracking branch 'origin/master' into utvm-rpc-server-merge
areusch 52e38b1
can't repro segfault, retrigger
areusch 97abd7c
Merge remote-tracking branch 'origin/master' into utvm-rpc-server-merge
areusch dc139f8
patch GIL fix
areusch 3131804
use better cmake/makefile rules
areusch 0e2574e
fixup bundle_deploy, unify crt_config.h, TVMInitializeRuntime
areusch dcb3fb5
fix build warnings
areusch e256cd9
deprecate building crt in source tree, adjust bundle_deploy makefile
areusch 4c5e662
git-clang-format
areusch 805d69e
Merge remote-tracking branch 'origin/master' into utvm-rpc-server-merge
areusch 0358eca
enable MICRO on i386, fix missing #include
areusch 093abab
add -fPIC to host crt builds
areusch c5941ee
move MISRA-C test to cpp_unittest.
areusch f803ba8
retrigger CI
areusch 975dab4
use proper --runtime= in target, don't double-generate mod wrapper
areusch 569d78a
disable DEBUG mode on test_crt workspace
areusch a3c0fae
allow using local graph runtime with all-rpc contexts, fix micro_tflite
areusch 799de5f
try to address relocation failure on ci-gpu
areusch 22fb6cd
lint
areusch 1c12a51
more lint
areusch aea5d3b
set all target_link_libraries to PRIVATE
areusch bc84b1e
add utvm_rpc_common library to micro TVM build logic
areusch c882735
address comments
areusch fce40ac
git-clang-format
areusch c20fa92
crttests pass
areusch b3fbf26
git-clang-format
areusch 9b5d89a
try to fix regression
areusch 4371f09
verbose makefile, for CI
areusch 0fde646
try adding more deps
areusch fd3d4f7
retrigger CI
areusch 73ce7ac
Merge remote-tracking branch 'origin/master' into utvm-rpc-server-merge
areusch 573be23
fix bad merge
areusch 8a441d3
merge in Target() change
areusch e6cde35
Merge remote-tracking branch 'origin/master' into utvm-rpc-server-merge
areusch 3fc9f1e
fix bad merge, delete more stuff
areusch 78993f4
delete moar things!
areusch 1b24904
fixing more bad merge
areusch d32f42d
address tqchen comments, add unit test for graph runtime
areusch 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
55 changes: 55 additions & 0 deletions
55
3rdparty/mbed-os/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_11/libraries/crc16/crc16.c
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,55 @@ | ||
/* | ||
* Copyright (c) 2013 Nordic Semiconductor ASA | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without modification, | ||
* are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, this list | ||
* of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form, except as embedded into a Nordic Semiconductor ASA | ||
* integrated circuit in a product or a software update for such product, must reproduce | ||
* the above copyright notice, this list of conditions and the following disclaimer in | ||
* the documentation and/or other materials provided with the distribution. | ||
* | ||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be | ||
* used to endorse or promote products derived from this software without specific prior | ||
* written permission. | ||
* | ||
* 4. This software, with or without modification, must only be used with a | ||
* Nordic Semiconductor ASA integrated circuit. | ||
* | ||
* 5. Any software provided in binary or object form under this license must not be reverse | ||
* engineered, decompiled, modified and/or disassembled. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | ||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
* | ||
*/ | ||
|
||
#include "crc16.h" | ||
|
||
#include <stdlib.h> | ||
|
||
uint16_t crc16_compute(uint8_t const* p_data, uint32_t size, uint16_t const* p_crc) { | ||
uint16_t crc = (p_crc == NULL) ? 0xFFFF : *p_crc; | ||
|
||
for (uint32_t i = 0; i < size; i++) { | ||
crc = (uint8_t)(crc >> 8) | (crc << 8); | ||
crc ^= p_data[i]; | ||
crc ^= (uint8_t)(crc & 0xFF) >> 4; | ||
crc ^= (crc << 8) << 4; | ||
crc ^= ((crc & 0xFF) << 4) << 1; | ||
} | ||
|
||
return crc; | ||
} |
78 changes: 78 additions & 0 deletions
78
3rdparty/mbed-os/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_11/libraries/crc16/crc16.h
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,78 @@ | ||
/* | ||
* Copyright (c) 2013 Nordic Semiconductor ASA | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without modification, | ||
* are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, this list | ||
* of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form, except as embedded into a Nordic Semiconductor ASA | ||
* integrated circuit in a product or a software update for such product, must reproduce | ||
* the above copyright notice, this list of conditions and the following disclaimer in | ||
* the documentation and/or other materials provided with the distribution. | ||
* | ||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be | ||
* used to endorse or promote products derived from this software without specific prior | ||
* written permission. | ||
* | ||
* 4. This software, with or without modification, must only be used with a | ||
* Nordic Semiconductor ASA integrated circuit. | ||
* | ||
* 5. Any software provided in binary or object form under this license must not be reverse | ||
* engineered, decompiled, modified and/or disassembled. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | ||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
* | ||
*/ | ||
|
||
/** @file | ||
* | ||
* @defgroup crc_compute CRC compute | ||
* @{ | ||
* @ingroup hci_transport | ||
* | ||
* @brief This module implements CRC-16-CCITT (polynomial 0x1021) with 0xFFFF initial value. | ||
* The data can be passed in multiple blocks. | ||
*/ | ||
|
||
#ifndef CRC16_H__ | ||
#define CRC16_H__ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <stdint.h> | ||
|
||
/**@brief Function for calculating CRC-16 in blocks. | ||
* | ||
* Feed each consecutive data block into this function, along with the current value of p_crc as | ||
* returned by the previous call of this function. The first call of this function should pass NULL | ||
* as the initial value of the crc in p_crc. | ||
* | ||
* @param[in] p_data The input data block for computation. | ||
* @param[in] size The size of the input data block in bytes. | ||
* @param[in] p_crc The previous calculated CRC-16 value or NULL if first call. | ||
* | ||
* @return The updated CRC-16 value, based on the input supplied. | ||
*/ | ||
uint16_t crc16_compute(uint8_t const* p_data, uint32_t size, uint16_t const* p_crc); | ||
|
||
#ifdef __cplusplus | ||
} // extern "C" | ||
#endif | ||
|
||
#endif // CRC16_H__ | ||
|
||
/** @} */ |
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
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.
consider making this as part of
crt_config.h
?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.
so actually i'm going the other way with this PR--saying that the backing memory for the memory allocator needs to be allocated by the caller. we can put these into
crt_config.h
, but I'm not sure what the benefit is after this change--the total memory is now passed in to memory.c as an argument.the reason for this is that an embedded project might want to e.g. pin the memory to some particular RAM on the device. that would need integration with a linker script, so we defer allocating the backing memory to project-specific code.