Skip to content

Commit ea73f20

Browse files
authored
[Refactor] Rename mmdeploy_python to mmdeploy_runtime (#1821)
* rename mmdeploy_python -> mmdeploy_runtime * remove incompatible build config * Revert "remove incompatible build config" This reverts commit cdc780c. * fix builder * update package_tools docs * fix linux set_env script * fix gcc 7.3 aligned_alloc * fix link * comment temporarily as text_det_recog can't be built with prebuild package built under manylinux
1 parent c394386 commit ea73f20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+117
-168
lines changed

.github/workflows/prebuild.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ jobs:
105105
pip install twine
106106
# twine upload * --repository testpypi -u __token__ -p ${{ secrets.test_pypi_password }}
107107
twine upload * -u __token__ -p ${{ secrets.pypi_password }}
108-
- name: Upload mmdeploy_python
108+
- name: Upload mmdeploy_runtime
109109
run: |
110-
cd $PREBUILD_DIR/$MMDEPLOY_VERSION/mmdeploy_python
110+
cd $PREBUILD_DIR/$MMDEPLOY_VERSION/mmdeploy_runtime
111111
# twine upload * --repository testpypi -u __token__ -p ${{ secrets.test_pypi_password }}
112112
twine upload * -u __token__ -p ${{ secrets.pypi_password }}
113113
- name: Zip mmdeploy sdk
@@ -213,9 +213,9 @@ jobs:
213213
conda activate mmdeploy-3.8
214214
# twine upload * --repository testpypi -u __token__ -p ${{ secrets.test_pypi_password }}
215215
twine upload * -u __token__ -p ${{ secrets.pypi_password }}
216-
- name: Upload mmdeploy_python
216+
- name: Upload mmdeploy_runtime
217217
run: |
218-
cd "D:/DEPS/ciartifact/$env:MMDEPLOY_VERSION/mmdeploy_python"
218+
cd "D:/DEPS/ciartifact/$env:MMDEPLOY_VERSION/mmdeploy_runtime"
219219
conda activate mmdeploy-3.8
220220
# twine upload * --repository testpypi -u __token__ -p ${{ secrets.test_pypi_password }}
221221
twine upload * -u __token__ -p ${{ secrets.pypi_password }}

csrc/mmdeploy/apis/python/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright (c) OpenMMLab. All rights reserved.
22

33
cmake_minimum_required(VERSION 3.14)
4-
project(mmdeploy_python)
4+
project(mmdeploy_runtime)
55

6-
set(MMDEPLOY_PYTHON_SRCS
6+
set(MMDEPLOY_RUNTIME_SRCS
77
common.cpp
88
internal.cpp
99
pipeline.cpp)
@@ -20,10 +20,10 @@ elseif (NOT TARGET pybind11)
2020
endif ()
2121

2222
foreach (task_name ${MMDEPLOY_TASKS})
23-
list(APPEND MMDEPLOY_PYTHON_SRCS ${task_name}.cpp)
23+
list(APPEND MMDEPLOY_RUNTIME_SRCS ${task_name}.cpp)
2424
endforeach ()
2525

26-
pybind11_add_module(${PROJECT_NAME} ${MMDEPLOY_PYTHON_SRCS})
26+
pybind11_add_module(${PROJECT_NAME} ${MMDEPLOY_RUNTIME_SRCS})
2727
# disable MMDEPLOY_CXX_USE_OPENCV in apis/cxx/mmdeploy/common.hpp
2828
target_compile_definitions(${PROJECT_NAME} PRIVATE -DMMDEPLOY_CXX_USE_OPENCV=0)
2929
if (APPLE)

csrc/mmdeploy/apis/python/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static PythonBindingRegisterer register_scheduler{[](py::module& m) {
165165

166166
} // namespace mmdeploy::python
167167

168-
PYBIND11_MODULE(mmdeploy_python, m) {
168+
PYBIND11_MODULE(mmdeploy_runtime, m) {
169169
for (const auto& f : mmdeploy::python::gPythonBindings()) {
170170
f(m);
171171
}

csrc/mmdeploy/apis/python/pose_tracker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ std::vector<py::tuple> Apply(mmdeploy::PoseTracker* self,
3030
std::vector<py::tuple> batch_ret;
3131
batch_ret.reserve(frames.size());
3232
for (const auto& rs : results) {
33-
py::array_t<float> keypoints({static_cast<int>(rs.size()), rs.size() > 0 ? rs[0].keypoint_count : 0, 3});
33+
py::array_t<float> keypoints(
34+
{static_cast<int>(rs.size()), rs.size() > 0 ? rs[0].keypoint_count : 0, 3});
3435
py::array_t<float> bboxes({static_cast<int>(rs.size()), 4});
3536
py::array_t<uint32_t> track_ids(static_cast<int>(rs.size()));
3637
auto kpts_ptr = keypoints.mutable_data();

csrc/mmdeploy/device/cpu/cpu_device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CpuHostMemory : public NonCopyable {
1818
#elif defined(ANDROID)
1919
posix_memalign(&data_, alignment, space);
2020
#else
21-
data_ = std::aligned_alloc(alignment, space);
21+
data_ = aligned_alloc(alignment, space);
2222
#endif
2323
if (!data_) {
2424
return Status(eOutOfMemory);

demo/csrc/cpp/text_det_recog.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ int main(int argc, char* argv[]) {
7676

7777
auto output = pipeline.Apply(mat);
7878

79-
MMDEPLOY_INFO("output:\n{}", output);
79+
// MMDEPLOY_INFO("output:\n{}", output);
8080

8181
return 0;
8282
}

demo/python/det_pose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import cv2
55
import numpy as np
6-
from mmdeploy_python import Detector, PoseDetector
6+
from mmdeploy_runtime import Detector, PoseDetector
77

88

99
def parse_args():

demo/python/image_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import argparse
33

44
import cv2
5-
from mmdeploy_python import Classifier
5+
from mmdeploy_runtime import Classifier
66

77

88
def parse_args():

demo/python/image_restorer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import argparse
33

44
import cv2
5-
from mmdeploy_python import Restorer
5+
from mmdeploy_runtime import Restorer
66

77

88
def parse_args():

demo/python/image_segmentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import cv2
55
import numpy as np
6-
from mmdeploy_python import Segmentor
6+
from mmdeploy_runtime import Segmentor
77

88

99
def parse_args():

0 commit comments

Comments
 (0)