Skip to content

Commit 1b1dd6b

Browse files
authored
[Metax]Update version information and fix collect_fpn_proposals (#2151)
1 parent d98535c commit 1b1dd6b

File tree

6 files changed

+35
-8
lines changed

6 files changed

+35
-8
lines changed

.github/workflows/metax_work_private.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
pull_request:
66
types: [opened, synchronize]
77
branches: [develop, release/**]
8-
schedule:
9-
- cron: "0 15 * * *"
8+
schedule:
9+
- cron: "0 15 * * *"
1010
permissions: read-all
1111

1212
defaults:

backends/metax_gpu/build_private_CI.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export CUCC_PATH=${MACA_PATH}/tools/cu-bridge
6767
export PATH=${PATH}:${CUCC_PATH}/tools:${CUCC_PATH}/bin
6868
export PATH=${MACA_PATH}/bin:${PATH}
6969
export LD_LIBRARY_PATH=${MACA_PATH}/lib:${MACA_PATH}/mxgpu_llvm/lib:${LD_LIBRARY_PATH}
70-
export PADDLE_VERSION=3.3.0
70+
export PADDLE_VERSION="3.3.0.dev$(date +%Y%m%d)"
7171

7272
if [ ! -d build ]; then
7373
echo "build directory not found, creating..."
@@ -86,6 +86,7 @@ echo "Done!"
8686

8787
cd build/dist/
8888
ossutil ls oss://opensource-ci/paddle/
89-
ossutil cat oss://opensource-ci/paddle/test1
90-
ossutil cp ./paddle_metax_gpu-*.whl oss://opensource-ci/paddle/test1/
89+
ossutil cat oss://opensource-ci/paddle/
90+
91+
ossutil cp ./paddle_metax_gpu-*.whl oss://opensource-ci/paddle/ -f
9192
cd -

backends/metax_gpu/compile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export CUCC_PATH=${MACA_PATH}/tools/cu-bridge
2222
export PATH=${PATH}:${CUCC_PATH}/tools:${CUCC_PATH}/bin
2323
export PATH=${MACA_PATH}/bin:${PATH}
2424
export LD_LIBRARY_PATH=${MACA_PATH}/lib:${MACA_PATH}/mxgpu_llvm/lib:${LD_LIBRARY_PATH}
25-
25+
export PADDLE_VERSION="3.3.0.dev$(date +%Y%m%d)"
2626
if [ ! -d build ]; then
2727
echo "build directory not found, creating..."
2828
mkdir build
@@ -31,7 +31,7 @@ fi
3131
echo "make_maca"
3232
cd build
3333
cmake_maca .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPython3_EXECUTABLE=$(which python3) -DWITH_GPU=ON
34-
make_maca -j10
34+
make_maca -j18
3535

3636

3737
echo "install whl"

backends/metax_gpu/env.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
DEFAULT_DIR="/opt/maca"
16+
export MACA_PATH=${1:-$DEFAULT_DIR}
17+
export CUDA_PATH=/usr/local/cuda
18+
export CUCC_PATH=${MACA_PATH}/tools/cu-bridge
19+
export PATH=${CUDA_PATH}/bin:${MACA_PATH}/ompi/bin:${MACA_PATH}/ucx/bin:${MACA_PATH}/mxgpu_llvm/bin:${MACA_PATH}/bin:${CUCC_PATH}/tools:${CUCC_PATH}/bin:${PATH}
20+
export LD_LIBRARY_PATH=${MACA_PATH}/lib:${MACA_PATH}/ompi/lib:${MACA_PATH}/mxgpu_llvm/lib:${LD_LIBRARY_PATH}

backends/metax_gpu/kernels/cuda_kernels/collect_fpn_proposals_kernel_register.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#include "paddle/phi/core/kernel_registry.h"
1516
#include "paddle/phi/kernels/gpu/collect_fpn_proposals_kernel.h"
1617

1718
PD_CUSTOM_KERNEL_REGISTER(collect_fpn_proposals,

backends/metax_gpu/setup.py.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ class BinaryDistribution(Distribution):
8181
def has_ext_modules(self):
8282
return True
8383

84+
# maca ai version
85+
maca_ai_version = os.getenv('MACA_AI_VERSION')
86+
if not maca_ai_version:
87+
maca_ai_version = "0.0.0"
88+
8489

8590
def main():
8691
write_custom_op_api_py()
@@ -89,7 +94,7 @@ def main():
8994

9095
setup(
9196
name = '@CMAKE_PROJECT_NAME@',
92-
version='@PLUGIN_VERSION@',
97+
version='@PLUGIN_VERSION@' + "+maca" + maca_ai_version,
9398
description='Paddle metax_gpu plugin',
9499
long_description='',
95100
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)