@@ -9,7 +9,7 @@ bk_estimation_package_metadata() {
99 "method_class": "lightweight",
1010 "detail_level": "basic",
1111 "required_inputs": {
12- "mandatory": ["result_json", "fom", "node_count "],
12+ "mandatory": ["result_json", "fom", "target_nodes_current", "target_nodes_future "],
1313 "optional": ["fom_breakdown"],
1414 "external": []
1515 },
@@ -46,7 +46,9 @@ bk_estimation_package_run() {
4646 local baseline_system=" ${BK_ESTIMATION_BASELINE_SYSTEM:- Fugaku} "
4747 local baseline_exp=" ${BK_ESTIMATION_BASELINE_EXP:- CASE0} "
4848 local future_system=" ${BK_ESTIMATION_FUTURE_SYSTEM:- FugakuNEXT} "
49- local scale_factor=" ${BK_ESTIMATION_SCALE_FACTOR:- 2} "
49+ local current_target_nodes=" ${BK_ESTIMATION_CURRENT_TARGET_NODES:- $est_node_count } "
50+ local future_target_nodes=" ${BK_ESTIMATION_FUTURE_TARGET_NODES:- $est_node_count } "
51+ local future_fom_factor=" ${BK_ESTIMATION_FUTURE_FOM_FACTOR:- ${BK_ESTIMATION_SCALE_FACTOR:- 1} } "
5052 local model_name=" ${BK_ESTIMATION_MODEL_NAME:- scale-mock} "
5153 local model_version=" ${BK_ESTIMATION_MODEL_VERSION:- 0.1} "
5254
@@ -60,14 +62,14 @@ bk_estimation_package_run() {
6062
6163 # Current/baseline side.
6264 est_current_system=" $baseline_system "
63- fetch_current_fom " $est_code " " $baseline_exp "
64- est_current_target_nodes=" $est_node_count "
65+ fetch_current_fom " $baseline_system " " $ est_code" " $baseline_exp "
66+ est_current_target_nodes=" $current_target_nodes "
6567 est_current_scaling_method=" measured"
6668
6769 # Future/predicted side.
6870 est_future_system=" $future_system "
69- est_future_fom=$( awk -v fom=" $est_fom " -v factor=" $scale_factor " ' BEGIN {printf "%.3f", fom * factor}' )
70- est_future_target_nodes=" $est_node_count "
71+ est_future_fom=$( awk -v fom=" $est_fom " -v factor=" $future_fom_factor " ' BEGIN {printf "%.3f", fom * factor}' )
72+ est_future_target_nodes=" $future_target_nodes "
7173 est_future_scaling_method=" $model_name "
7274
7375 est_measurement_json=$( jq -cn \
@@ -87,11 +89,22 @@ bk_estimation_package_run() {
8789 est_assumptions_json=$( jq -cn \
8890 --arg future_system " $future_system " \
8991 --arg baseline_system " $baseline_system " \
90- --arg scale_factor " $scale_factor " \
92+ --arg current_target_nodes " $current_target_nodes " \
93+ --arg future_target_nodes " $future_target_nodes " \
94+ --arg future_fom_factor " $future_fom_factor " \
9195 ' {
96+ scaling_assumption: "weak-scaling",
9297 future_system_assumption: $future_system,
9398 baseline_system: $baseline_system,
94- future_fom_rule: ($scale_factor + "x benchmark FOM when no detailed model is available")
99+ current_target_nodes: $current_target_nodes,
100+ future_target_nodes: $future_target_nodes,
101+ future_fom_rule: (
102+ if $future_fom_factor == "1" then
103+ "keep FOM constant unless additional correction terms are explicitly introduced"
104+ else
105+ ($future_fom_factor + "x benchmark FOM with explicit lightweight correction")
106+ end
107+ )
95108 }' )
96109
97110 est_model_json=$( jq -cn \
@@ -117,9 +130,9 @@ bk_estimation_package_run() {
117130 fi
118131
119132 if [[ -n " $raw_breakdown " ]]; then
120- est_future_fom_breakdown=$( echo " $raw_breakdown " | jq -c --arg scale_factor " $scale_factor " --arg model_name " $model_name " ' {
121- sections: [.sections[] | {name, bench_time: .time, scaling_method: $model_name, time: (.time * ($scale_factor | tonumber))}],
122- overlaps: [(.overlaps // [])[] | {sections, bench_time: .time, scaling_method: $model_name, time: (.time * ($scale_factor | tonumber))}]
133+ est_future_fom_breakdown=$( echo " $raw_breakdown " | jq -c --arg future_fom_factor " $future_fom_factor " --arg model_name " $model_name " ' {
134+ sections: [.sections[] | {name, bench_time: .time, scaling_method: $model_name, time: (.time * ($future_fom_factor | tonumber))}],
135+ overlaps: [(.overlaps // [])[] | {sections, bench_time: .time, scaling_method: $model_name, time: (.time * ($future_fom_factor | tonumber))}]
123136 }' )
124137
125138 est_current_fom_breakdown=$( echo " $raw_breakdown " | jq -c ' {
@@ -138,7 +151,7 @@ bk_estimation_package_run() {
138151bk_estimation_package_apply_metadata () {
139152 bk_estimation_set_package_metadata \
140153 " lightweight_fom_scaling" \
141- " ${BK_ESTIMATION_MODEL_VERSION :- 0.1} " \
154+ " 0.1" \
142155 " lightweight" \
143156 " basic"
144157
0 commit comments