FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
software-layer/.github/workflows/scripts/compare_to_generic.sh at main · EESSI/software-layer · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
EESSI
/
software-layer
Public
Notifications
You must be signed in to change notification settings
Fork
87
Star
35
Code
Issues
46
Pull requests
21
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
software-layer
/
.github
/
workflows
/
scripts
/
compare_to_generic.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
55 lines (53 loc) · 2.08 KB
Breadcrumbs
software-layer
/
.github
/
workflows
/
scripts
/
compare_to_generic.sh
Copy path
File metadata and controls
executable file
·
55 lines (53 loc) · 2.08 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!
/usr/bin/env bash
script_dir=
"
$(
cd
"
$(
dirname
"
${BASH_SOURCE[0]}
"
)
"
&&
pwd
)
"
#
Take the arguments
base_dir=
$1
target_arch=
$2
modules_subdir=
"
modules/all
"
#
Decide if we want x86_64 or aarch64
arch=
$(
echo
$target_arch
|
cut -d
"
/
"
-f1
)
#
Get the generic directory
source_of_truth=
"
$arch
/generic
"
case
$arch
in
"
x86_64
"
)
echo
"
Using
$source_of_truth
as source of truth
"
;;
"
aarch64
"
)
echo
"
Using
$source_of_truth
as source of truth
"
;;
*
)
echo
"
I don't understand the base architecture:
$arch
"
exit
1
;;
esac
source_of_truth_modules=
"
$base_dir
/
$source_of_truth
/
$modules_subdir
"
arch_modules=
"
$base_dir
/
$target_arch
/
$modules_subdir
"
echo
"
Comparing
$arch_modules
to
$source_of_truth_modules
"
if
!
python3
$script_dir
/compare_stacks.py
$source_of_truth_modules
$arch_modules
;
then
echo
"
Warning: Comparison failed for CPU stacks
"
>&2
exit
1
fi
#
Also compare accelerator software stacks
if
[[
-n
"
$ACCELERATOR_TARGETS
"
]]
;
then
read
-ra accel_capabilities
<<<
"
$ACCELERATOR_TARGETS
"
echo
"
Also comparing accelerator-enabled software stacks (for compute capabilities:
${accel_capabilities[@]}
)
"
#
Initialize a variable to track failures
any_failure=0
#
Loop over the array
for
accel
in
"
${accel_capabilities[@]}
"
;
do
source_of_truth_accel=
"
${ACCELERATOR_TARGETS
%%
*
}
"
#
Just use the first entry as source of truth
source_of_truth_modules=
"
$base_dir
/
$source_of_truth
/accel/
${source_of_truth_accel}
/
$modules_subdir
"
arch_modules=
"
$base_dir
/
$target_arch
/accel/
$accel
/
$modules_subdir
"
echo
"
Comparing
$arch_modules
to
$source_of_truth_modules
"
if
!
python3
$script_dir
/compare_stacks.py
$source_of_truth_modules
$arch_modules
;
then
echo
"
Warning: Comparison failed for compute capability
$cc
"
>&2
any_failure=1
fi
done
if
[[
$any_failure
-ne
0 ]]
;
then
echo
"
One or more accelerator software stack comparisons failed.
"
>&2
exit
1
fi
else
echo
"
ACCELERATOR_TARGETS is not set or is empty, not checking accelerator software stacks
"
fi
Back
|
FazBrowse Home
|
New Git URL