Skip to content

Commit 1a73ef1

Browse files
committed
DRAFT compiler support U24.04
on-going draft with compiler support U24.04 Signed-off-by: SaeHie Park <[email protected]>
1 parent b7ef4ca commit 1a73ef1

File tree

11 files changed

+63
-55
lines changed

11 files changed

+63
-55
lines changed

.github/workflows/run-onecc-build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ jobs:
4545
strategy:
4646
matrix:
4747
type: [ Debug, Release ]
48-
ubuntu_code: [ focal, jammy ]
48+
ubuntu_code: [ focal, jammy ] #, noble ]
4949
include:
5050
- ubuntu_code: focal
5151
ubuntu_ver: 20.04
5252
- ubuntu_code: jammy
5353
ubuntu_ver: 22.04
54+
#- ubuntu_code: noble
55+
# ubuntu_ver: 24.04
5456
runs-on: one-x64-linux
5557
container:
5658
image: samsungonedev.azurecr.io/nnfw/one-devtools:${{ matrix.ubuntu_code }}
@@ -67,9 +69,15 @@ jobs:
6769
# dalgona uses pybind11, but pybind11 cannot bind packages in virtualenv.
6870
# So we need to install packages for dalgona-test globally.
6971
- name: Install required packages
72+
if: ${{ matrix.ubuntu_code == 'focal' || matrix.ubuntu_code == 'jammy' }}
7073
run: |
7174
python3 -m pip install numpy h5py==3.11.0 flatbuffers==23.5.26
7275
76+
- name: Install required packages
77+
if: ${{ matrix.ubuntu_code == 'noble' }}
78+
run: |
79+
apt-get install -y python3-numpy python3-h5py python3-flatbuffers
80+
7381
- name: Caching externals
7482
uses: actions/cache@v4
7583
with:

.github/workflows/run-onert-android-build.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ on:
2121
- master
2222
- release/*
2323
paths:
24-
- '.github/workflows/run-onert-android-build.yml'
25-
- 'nn*'
26-
- 'Makefile.template'
27-
- 'infra/buildtool/**'
28-
- 'infra/cmake/**'
29-
- 'infra/nncc/**'
30-
- 'infra/nnfw/**'
3124
- 'runtime/**'
3225
- '!runtime/contrib/**'
3326
- '!**/*.md'

.github/workflows/run-onert-cross-build.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ on:
2121
- master
2222
- release/*
2323
paths:
24-
- '.github/workflows/run-onert-cross-build.yml'
25-
- 'nn*'
26-
- 'Makefile.template'
27-
- 'infra/buildtool/**'
28-
- 'infra/cmake/**'
29-
- 'infra/nncc/**'
30-
- 'infra/nnfw/**'
3124
- 'runtime/**'
3225
- '!runtime/contrib/**'
3326
- '!**/*.md'

.github/workflows/run-onert-gbs-build.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@ on:
2424
- master
2525
- release/*
2626
paths:
27-
- '.github/workflows/run-onert-gbs-build.yml'
28-
- 'nncc'
29-
- 'nnfw'
30-
- 'compiler/luci/**'
31-
- 'compiler/loco/**'
32-
- 'compiler/logo/**'
33-
- 'compute/**'
34-
- 'infra/nnfw/**'
35-
- 'infra/cmake/**'
3627
- 'runtime/**'
3728
- '!runtime/contrib/**'
3829
- 'packaging/**'

.github/workflows/run-onert-native-build.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ on:
2121
- master
2222
- release/*
2323
paths:
24-
- '.github/workflows/run-onert-native-build.yml'
25-
- 'nn*'
26-
- 'Makefile.template'
27-
- 'infra/buildtool/**'
28-
- 'infra/cmake/**'
29-
- 'infra/nncc/**'
30-
- 'infra/nnfw/**'
3124
- 'runtime/**'
3225
- '!runtime/contrib/**'
3326
- '!**/*.md'

compiler/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set(ONE_UBUNTU_CODENAME "focal")
44
find_program(LSB_RELEASE_EXEC lsb_release)
55
if(LSB_RELEASE_EXEC)
6-
# output should be one of 'bionic', 'focal', 'jammy'
6+
# output should be one of 'bionic', 'focal', 'jammy', 'noble'
77
# others are not tested
88
execute_process(COMMAND "${LSB_RELEASE_EXEC}" --short --codename
99
OUTPUT_VARIABLE ONE_UBUNTU_CODENAME
@@ -14,6 +14,10 @@ endif()
1414

1515
if(${ONE_UBUNTU_CODENAME} STREQUAL "bionic")
1616
set(ONE_UBUNTU_CODENAME_BIONIC TRUE)
17+
elseif(${ONE_UBUNTU_CODENAME} STREQUAL "focal")
18+
set(ONE_UBUNTU_CODENAME_FOCAL TRUE)
19+
elseif(${ONE_UBUNTU_CODENAME} STREQUAL "jammy")
20+
set(ONE_UBUNTU_CODENAME_JAMMY TRUE)
1721
elseif(${ONE_UBUNTU_CODENAME} STREQUAL "noble")
1822
set(ONE_UBUNTU_CODENAME_NOBLE TRUE)
1923
endif()

compiler/common-artifacts/CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,22 @@ elseif (PYTHON_VERSION_MINOR EQUAL 10)
103103
list(APPEND PY_PKG_LIST "h5py==3.11.0")
104104
list(APPEND PY_PKG_LIST "cffi==1.16.0")
105105
list(APPEND PY_PKG_LIST "numpy==1.26.4")
106+
elseif (PYTHON_VERSION_MINOR EQUAL 12)
107+
# python 3.12; Ubuntu 24.04
108+
# TF2.19.0 release at 2025-03-12
109+
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64")
110+
list(APPEND PY_PKG_LIST "tensorflow==2.19.0")
111+
else(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64")
112+
list(APPEND PY_PKG_LIST "tensorflow-cpu==2.19.0")
113+
endif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64")
114+
list(APPEND PY_PKG_LIST "flatbuffers==24.3.25")
115+
list(APPEND PY_PKG_LIST "protobuf==4.23.3")
116+
list(APPEND PY_PKG_LIST "pydot==1.4.2")
117+
list(APPEND PY_PKG_LIST "pytest==7.4.3")
118+
list(APPEND PY_PKG_LIST "h5py==3.11.0")
119+
list(APPEND PY_PKG_LIST "cffi==1.16.0")
120+
list(APPEND PY_PKG_LIST "numpy==1.26.4")
106121
else()
107-
# TODO add for 12
108122
# should not enter here
109123
message(FATAL_ERROR "Build common-artifacts: FAILED (Invalid pyhon version)")
110124
endif()

compiler/one-cmds/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Ubuntu18.04; explictly installed python3.8 (default is python3.6)
33
# Ubuntu20.04; default python3.8
44
# Ubuntu22.04; default python3.10
5-
# Ubuntu24.04; explicitly installed python3.8 (default is python3.12)
5+
# Ubuntu24.04; default python3.12
66
# refer https://github.com/Samsung/ONE/issues/9962
77
if(CMAKE_VERSION VERSION_LESS 3.12)
88
find_package(PythonInterp 3.8 QUIET)
@@ -24,10 +24,10 @@ else()
2424
endif()
2525

2626
# tensorflow 2.12.1 supports Python 3.8 ~ 3.11
27-
if(Python_VERSION VERSION_GREATER_EQUAL 3.12)
28-
message(STATUS "Build one-cmds: FALSE (Python version 3.12 or higher is not supported yet)")
29-
return()
30-
endif()
27+
#if(Python_VERSION VERSION_GREATER_EQUAL 3.12)
28+
# message(STATUS "Build one-cmds: FALSE (Python version 3.12 or higher is not supported yet)")
29+
# return()
30+
#endif()
3131
if(Python_VERSION VERSION_LESS 3.8)
3232
message(STATUS "Build one-cmds: FAILED (Install Python version 3.8 or 3.10)")
3333
return()

compiler/one-cmds/one-import-onnx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ import os
2424
import sys
2525
import tempfile
2626
import onnx
27-
import onnx_tf
27+
28+
# onnx_tf may not exist for latest python
29+
try:
30+
import onnx_tf
31+
_onnx_tf_enabled = True
32+
except ImportError:
33+
_onnx_tf_enabled = False
2834

2935
# ONNX legalizer is an optional feature
3036
# It enables conversion of some operations, but in experimental phase for now
@@ -124,6 +130,10 @@ class TidyIONames:
124130
self.onnx_model.graph.output[i].name = self.remap_outputs[idx]
125131

126132

133+
def _check_onnx_tf():
134+
import onnx
135+
136+
127137
def get_driver_cfg_section():
128138
return "one-import-onnx"
129139

@@ -330,6 +340,9 @@ def _convert(args):
330340
if _force_ext(args):
331341
run_default_import = False
332342

343+
if not _onnx_tf_enabled:
344+
run_default_import = False
345+
333346
res_conv = -1
334347
if run_default_import:
335348
if _force_ext(args):

compiler/one-cmds/one-prepare-venv.u2404

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ VENV_PYTHON=${DRIVER_PATH}/venv/bin/python
2626

2727
if [ ! -f ${VENV_ACTIVATE} ]; then
2828
# Create python virtual enviornment
29-
python3.8 -m venv "${DRIVER_PATH}/venv"
29+
python3 -m venv "${DRIVER_PATH}/venv"
3030
fi
3131

3232
# NOTE version
3333
# - https://github.com/onnx/onnx/blob/master/docs/Versioning.md
3434
# - https://github.com/onnx/onnx-tensorflow/blob/master/Versioning.md
3535

36-
VER_TENSORFLOW=2.12.1
37-
VER_ONNX=1.16.0
38-
VER_ONNXRUNTIME=1.18.0
39-
VER_ONNX_TF=1.10.0
36+
VER_TENSORFLOW=2.19.0 # 2025-03-12
37+
VER_ONNX=1.17.0
38+
VER_ONNXRUNTIME=1.20.1
39+
#VER_ONNX_TF=1.10.0
4040
VER_PYDOT=1.4.2
41-
VER_TORCH="2.1.2+cpu"
41+
VER_TORCH="2.6.0+cpu"
4242

4343
# Install tensorflow
4444

@@ -66,8 +66,8 @@ else
6666
fi
6767
${VENV_PYTHON} -m pip ${PIP_OPTIONS} install Pillow
6868
# Fix version to that of TF release date
69-
${VENV_PYTHON} -m pip ${PIP_OPTIONS} install tensorflow_probability==0.20.1
70-
${VENV_PYTHON} -m pip ${PIP_OPTIONS} install tensorflow_addons==0.20.0
69+
#${VENV_PYTHON} -m pip ${PIP_OPTIONS} install tensorflow_probability==0.25.0
70+
#${VENV_PYTHON} -m pip ${PIP_OPTIONS} install tensorflow_addons==0.23.0
7171

7272
# Install PyTorch and ONNX related
7373
# NOTE set ONE_PREPVENV_TORCH_SOURCE to override options for source URL.
@@ -84,14 +84,14 @@ ${VENV_PYTHON} -m pip ${PIP_OPTIONS} install onnx==${VER_ONNX}
8484
${VENV_PYTHON} -m pip ${PIP_OPTIONS} install onnxruntime==${VER_ONNXRUNTIME}
8585

8686
# Provide install of custom onnx-tf
87-
if [ -n "${EXT_ONNX_TF_WHL}" ]; then
88-
${VENV_PYTHON} -m pip ${PIP_OPTIONS} install ${EXT_ONNX_TF_WHL}
89-
else
90-
${VENV_PYTHON} -m pip ${PIP_OPTIONS} install onnx-tf==${VER_ONNX_TF}
91-
fi
87+
#if [ -n "${EXT_ONNX_TF_WHL}" ]; then
88+
# ${VENV_PYTHON} -m pip ${PIP_OPTIONS} install ${EXT_ONNX_TF_WHL}
89+
#else
90+
# ${VENV_PYTHON} -m pip ${PIP_OPTIONS} install onnx-tf==${VER_ONNX_TF}
91+
#fi
9292

9393
# Fix version to that of TF release date
94-
${VENV_PYTHON} -m pip ${PIP_OPTIONS} install --upgrade protobuf==4.23.3
94+
${VENV_PYTHON} -m pip ${PIP_OPTIONS} install --upgrade protobuf==5.29.4
9595

9696
# Install pydot for visq
9797
${VENV_PYTHON} -m pip ${PIP_OPTIONS} install pydot==${VER_PYDOT}

0 commit comments

Comments
 (0)