Skip to content

Commit d62a357

Browse files
authored
Bump version to 0.3.0rc7 and relax backend version requirement (#552)
### Summary: Update the Neuropod version to `0.3.0rc7`. This PR also allows Neuropod `0.3.0rc7` to use backends from `0.3.0rc6`. This is a temporary workaround to avoid having to reinstall backends whenever upgrading the main library. This will be improved once we have a long term release/ABI compatibility strategy (along with an ability to test and enforce it in CI). ### Test Plan: CI + Local tests by @qiyanz to check backend compatibility
1 parent 390ae02 commit d62a357

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

docs/installing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ sudo mkdir -p "$NEUROPOD_BASE_DIR"
4242
# Find URLs of backends you want to install from the releases page (https://github.com/uber/neuropod/releases) and install them
4343
# by untarring them in your NEUROPOD_BASE_DIR directory.
4444
# For example, to install a GPU enabled Torch 1.7 backend for CUDA 10.1, run
45-
curl -L https://github.com/uber/neuropod/releases/download/v0.3.0-rc6/libneuropod-gpu-cuda-10.1-linux-v0.3.0-rc6-torchscript-1.7.0-backend.tar.gz | sudo tar -xz -C "$NEUROPOD_BASE_DIR"
45+
curl -L https://github.com/uber/neuropod/releases/download/v0.3.0-rc7/libneuropod-gpu-cuda-10.1-linux-v0.3.0-rc7-torchscript-1.7.0-backend.tar.gz | sudo tar -xz -C "$NEUROPOD_BASE_DIR"
4646
```
4747

4848
Multiple backends can be installed for a given framework and Neuropod will select the correct one when loading a model.

source/bazel/version.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
NEUROPOD_VERSION = "0.3.0rc6"
1+
NEUROPOD_VERSION = "0.3.0rc7"

source/neuropod/internal/backend_registration.cc

+21-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@ void init_registrar_if_needed()
5353
});
5454
}
5555

56-
std::vector<BackendLoadSpec> get_default_backend_map()
56+
void populate_default_backend_map(const std::string &neuropod_version, std::vector<BackendLoadSpec> &out)
5757
{
58-
std::vector<BackendLoadSpec> out;
59-
6058
// A structure to store some basic info about frameworks we support
6159
struct FrameworkInfo
6260
{
@@ -113,7 +111,7 @@ std::vector<BackendLoadSpec> get_default_backend_map()
113111
// "/usr/local/lib/neuropod/0.2.0/backends/torchscript_1.4.0/libneuropod_torchscript_backend.so"
114112
// Ex:
115113
// "/usr/local/lib/neuropod/0.2.0/backends/torchscript_1.4.0_gpu/libneuropod_torchscript_backend.so"
116-
item.path = neuropod_base_dir + ("/" NEUROPOD_VERSION "/backends/") + framework.type + "_" +
114+
item.path = neuropod_base_dir + ("/" + neuropod_version + "/backends/") + framework.type + "_" +
117115
version + (is_gpu ? "_gpu" : "") + "/" + framework.soname;
118116
}
119117
else
@@ -126,6 +124,25 @@ std::vector<BackendLoadSpec> get_default_backend_map()
126124
}
127125
}
128126
}
127+
}
128+
129+
std::vector<BackendLoadSpec> get_default_backend_map()
130+
{
131+
// Reverse priority order (highest priority at the end of the vector)
132+
std::vector<BackendLoadSpec> out;
133+
134+
// TODO: improve this once we have a long term strategy on ABI compatibility
135+
//
136+
// If we decide not to break ABI compatibility within a given major version,
137+
// maybe we just filter the folders in NEUROPOD_BASE_DIR instead of listing
138+
// all possible versions
139+
std::vector<std::string> supported_versions = {"0.3.0rc6", "0.3.0rc7"};
140+
assert(supported_versions.back() == NEUROPOD_VERSION);
141+
142+
for (const auto &version : supported_versions)
143+
{
144+
populate_default_backend_map(version, out);
145+
}
129146

130147
return out;
131148
}

source/neuropod/version.hh

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ namespace neuropod
3232

3333
// These are allowed to be 4 bits each
3434
#define NEUROPOD_RELEASE_LEVEL NEUROPOD_RELEASE_LEVEL_RELEASE_CANDIDATE
35-
#define NEUROPOD_RELEASE_SERIAL 6
35+
#define NEUROPOD_RELEASE_SERIAL 7
3636

3737
static_assert(NEUROPOD_RELEASE_LEVEL < 16, "NEUROPOD_RELEASE_LEVEL must be in the range 0 to 15 (4 bits)");
3838
static_assert(NEUROPOD_RELEASE_SERIAL < 16, "NEUROPOD_RELEASE_SERIAL must be in the range 0 to 15 (4 bits)");
3939

4040
// The version as a string
41-
#define NEUROPOD_VERSION "0.3.0rc6"
41+
#define NEUROPOD_VERSION "0.3.0rc7"
4242

4343
// Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
4444
// Use this for numeric comparisons

source/python/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def has_ext_modules(foo):
1919

2020
setup(
2121
name="neuropod",
22-
version="0.3.0rc6",
22+
version="0.3.0rc7",
2323
install_requires=REQUIRED_PACKAGES,
2424
packages=find_packages(),
2525
package_data={

0 commit comments

Comments
 (0)