Skip to content

Commit 3ffe080

Browse files
committed
Added openssl deps for get-lib-aocl-crypto
1 parent 78533b5 commit 3ffe080

9 files changed

Lines changed: 256 additions & 1 deletion

File tree

script/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MLCommons Automation Scripts
22

3-
*Last updated: 2026-04-17 21:50:41*
3+
*Last updated: 2026-04-17 21:57:24*
44

55
This directory contains automation scripts for MLPerf benchmarks, AI/ML workflows, and development operations.
66

script/get-lib-aocl-crypto/meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ deps:
2828
- tags: get,cmake
2929
- tags: detect,cpu
3030
- tags: get,utils,aocl-utils
31+
- tags: get,openssl
3132
- tags: get,git,repo
3233
names:
3334
- aocl-crypto-repo

script/get-lib-aocl-crypto/run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@ fi
77
cd ${MLC_AOCL_CRYPTO_SRC_PATH}
88
mkdir -p build && cd build
99

10+
# Derive OpenSSL install prefix from the detected bin path
11+
OPENSSL_ROOT=""
12+
if [[ -n ${MLC_OPENSSL_INSTALLED_PATH} ]]; then
13+
OPENSSL_ROOT=$(dirname ${MLC_OPENSSL_INSTALLED_PATH})
14+
fi
15+
1016
cmake .. \
1117
-DCMAKE_INSTALL_PREFIX=${MLC_AOCL_CRYPTO_SRC_PATH}/install \
1218
-DCMAKE_BUILD_TYPE=Release \
19+
${OPENSSL_ROOT:+-DOPENSSL_INSTALL_DIR=${OPENSSL_ROOT}} \
1320
${MLC_CMAKE_EXTRA_FLAGS}
1421
test $? -eq 0 || exit $?
1522

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from mlc import utils
2+
import os
3+
4+
5+
def preprocess(i):
6+
7+
os_info = i['os_info']
8+
if os_info['platform'] == 'windows':
9+
return {'return': 1, 'error': 'Windows is not supported in this script yet'}
10+
11+
return {'return': 0}
12+
13+
14+
def postprocess(i):
15+
16+
env = i['env']
17+
18+
src_path = env.get('MLC_AOCL_FFTZ_SRC_PATH', env.get('MLC_GIT_REPO_CHECKOUT_PATH', ''))
19+
install_path = os.path.join(src_path, 'install')
20+
21+
env['MLC_AOCL_FFTZ_SRC_PATH'] = src_path
22+
env['MLC_AOCL_FFTZ_BUILD_PATH'] = os.path.join(src_path, 'build')
23+
env['MLC_AOCL_FFTZ_INSTALL_PATH'] = install_path
24+
25+
lib_path = os.path.join(install_path, 'lib')
26+
if not os.path.isdir(lib_path):
27+
lib_path = os.path.join(install_path, 'lib64')
28+
env['MLC_AOCL_FFTZ_LIB_PATH'] = lib_path
29+
30+
env['+LD_LIBRARY_PATH'] = [lib_path]
31+
env['+LIBRARY_PATH'] = [lib_path]
32+
env['+C_INCLUDE_PATH'] = [os.path.join(install_path, 'include')]
33+
env['+CPLUS_INCLUDE_PATH'] = [os.path.join(install_path, 'include')]
34+
35+
return {'return': 0}

script/get-lib-aocl-fftz/meta.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
alias: get-lib-aocl-fftz
2+
uid: 138bd79bf7534b66
3+
automation_alias: script
4+
automation_uid: 5b4e0237da074764
5+
6+
category: Detection or installation of tools and artifacts
7+
tags:
8+
- get
9+
- lib
10+
- lib-aocl-fftz
11+
- aocl-fftz
12+
- aocl
13+
14+
cache: true
15+
16+
new_env_keys:
17+
- MLC_AOCL_FFTZ_SRC_PATH
18+
- MLC_AOCL_FFTZ_BUILD_PATH
19+
- MLC_AOCL_FFTZ_INSTALL_PATH
20+
- MLC_AOCL_FFTZ_LIB_PATH
21+
- +LD_LIBRARY_PATH
22+
- +LIBRARY_PATH
23+
- +C_INCLUDE_PATH
24+
- +CPLUS_INCLUDE_PATH
25+
new_state_keys: []
26+
27+
deps:
28+
- tags: get,cmake
29+
- tags: detect,cpu
30+
- tags: get,utils,aocl-utils
31+
- tags: get,git,repo
32+
names:
33+
- aocl-fftz-repo
34+
extra_cache_tags: aocl-fftz,repo,aocl-fftz-repo
35+
env:
36+
MLC_GIT_CHECKOUT_PATH_ENV_NAME: MLC_AOCL_FFTZ_SRC_PATH
37+
force_env_keys:
38+
- MLC_GIT_*
39+
update_tags_from_env_with_prefix:
40+
_branch.:
41+
- MLC_GIT_CHECKOUT
42+
_repo.:
43+
- MLC_GIT_REPO_URL
44+
_tag.:
45+
- MLC_GIT_CHECKOUT_TAG
46+
47+
variations:
48+
branch.#:
49+
env:
50+
MLC_GIT_CHECKOUT: '#'
51+
tag.#:
52+
env:
53+
MLC_GIT_CHECKOUT_TAG: '#'
54+
group: version
55+
repo.#:
56+
env:
57+
MLC_GIT_REPO_URL: '#'
58+
group: repo
59+
repo.amd:
60+
default: true
61+
env:
62+
MLC_GIT_REPO_URL: https://github.com/amd/aocl-fftz.git
63+
group: repo
64+
65+
default_version: '5.2'
66+
versions:
67+
'5.2':
68+
env:
69+
MLC_GIT_CHECKOUT: '5.2'
70+
amd-main:
71+
env:
72+
MLC_GIT_CHECKOUT: amd-main
73+
74+
tests:
75+
run_inputs:
76+
- variations_list:
77+
- repo.amd

script/get-lib-aocl-fftz/run.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
if [[ -z ${MLC_AOCL_FFTZ_SRC_PATH} ]]; then
3+
echo "Git repository not found!"
4+
exit 1
5+
fi
6+
7+
cd ${MLC_AOCL_FFTZ_SRC_PATH}
8+
mkdir -p build && cd build
9+
10+
cmake .. \
11+
-DCMAKE_INSTALL_PREFIX=${MLC_AOCL_FFTZ_SRC_PATH}/install \
12+
-DCMAKE_BUILD_TYPE=Release \
13+
${MLC_CMAKE_EXTRA_FLAGS}
14+
test $? -eq 0 || exit $?
15+
16+
cmake --build . -j${MLC_HOST_CPU_TOTAL_PHYSICAL_CORES}
17+
test $? -eq 0 || exit $?
18+
19+
cmake --install .
20+
test $? -eq 0 || exit $?
21+
22+
echo "get-lib-aocl-fftz built and installed successfully."
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from mlc import utils
2+
from utils import is_true
3+
import os
4+
5+
6+
def preprocess(i):
7+
8+
os_info = i['os_info']
9+
10+
env = i['env']
11+
12+
return {'return': 0}
13+
14+
15+
def postprocess(i):
16+
17+
env = i['env']
18+
19+
src_path = env.get('MLC_AOCL_LIBM_SRC_PATH', env.get('MLC_GIT_REPO_CHECKOUT_PATH', ''))
20+
env['MLC_AOCL_LIBM_SRC_PATH'] = src_path
21+
env['MLC_AOCL_LIBM_BUILD_PATH'] = os.path.join(src_path, 'build')
22+
23+
aocl_lib_path = os.path.join(src_path, 'build', 'aocl-release', 'src')
24+
env['MLC_AOCL_LIBM_LIB_PATH'] = aocl_lib_path
25+
26+
env['+LIBRARY_PATH'] = [aocl_lib_path]
27+
env['+LD_LIBRARY_PATH'] = [aocl_lib_path]
28+
29+
return {'return': 0}

script/get-lib-aocl-libm/meta.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
alias: get-lib-aocl-libm
2+
uid: a65d3088f57d413d
3+
automation_alias: script
4+
automation_uid: 5b4e0237da074764
5+
6+
category: Detection or installation of tools and artifacts
7+
tags:
8+
- get
9+
- lib
10+
- lib-aocl-libm
11+
- aocl-libm
12+
- aocl
13+
14+
cache: true
15+
16+
new_env_keys:
17+
- MLC_AOCL_LIBM_BUILD_PATH
18+
- MLC_AOCL_LIBM_SRC_PATH
19+
- MLC_AOCL_LIBM_LIB_PATH
20+
- +LD_LIBRARY_PATH
21+
- +LIBRARY_PATH
22+
new_state_keys: []
23+
24+
deps:
25+
- tags: get,generic,sys-util,_libmpfr-dev
26+
- tags: get,generic-python-lib,_scons
27+
- tags: detect,cpu
28+
- tags: get,utils,aocl-utils
29+
- tags: get,git,repo
30+
names:
31+
- aocl-libm-repo
32+
extra_cache_tags: aocl-libm,repo,aocl-libm-repo
33+
env:
34+
MLC_GIT_CHECKOUT_PATH_ENV_NAME: MLC_AOCL_LIBM_SRC_PATH
35+
force_env_keys:
36+
- MLC_GIT_*
37+
update_tags_from_env_with_prefix:
38+
_branch.:
39+
- MLC_GIT_CHECKOUT
40+
_repo.:
41+
- MLC_GIT_REPO_URL
42+
_tag.:
43+
- MLC_GIT_CHECKOUT_TAG
44+
45+
variations:
46+
branch.#:
47+
env:
48+
MLC_GIT_CHECKOUT: '#'
49+
tag.#:
50+
env:
51+
MLC_GIT_CHECKOUT_TAG: '#'
52+
group: version
53+
repo.#:
54+
env:
55+
MLC_GIT_REPO_URL: '#'
56+
group: repo
57+
repo.amd:
58+
default: true
59+
env:
60+
MLC_GIT_REPO_URL: https://github.com/amd/aocl-libm-ose
61+
group: repo
62+
63+
default_version: '5.2.2'
64+
versions:
65+
5.2.2:
66+
env:
67+
MLC_GIT_CHECKOUT: '5.2.2'
68+
master:
69+
env:
70+
MLC_GIT_CHECKOUT: master
71+
72+
tests:
73+
run_inputs:
74+
- variations_list:
75+
- repo.amd

script/get-lib-aocl-libm/run.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
if [[ -z ${MLC_GIT_REPO_CHECKOUT_PATH} ]]; then
3+
echo "Git repository not found!"
4+
exit 1
5+
fi
6+
cd ${MLC_GIT_REPO_CHECKOUT_PATH}
7+
scons -j${MLC_HOST_CPU_TOTAL_PHYSICAL_CORES}
8+
test $? -eq 0 || exit $?
9+

0 commit comments

Comments
 (0)