Skip to content

[chore](openblas) Add DYNAMIC_ARCH control option to build.sh#60943

Open
zhiqiang-hhhh wants to merge 1 commit intoapache:masterfrom
zhiqiang-hhhh:opt-dynamic
Open

[chore](openblas) Add DYNAMIC_ARCH control option to build.sh#60943
zhiqiang-hhhh wants to merge 1 commit intoapache:masterfrom
zhiqiang-hhhh:opt-dynamic

Conversation

@zhiqiang-hhhh
Copy link
Contributor

Add DYNAMIC_ARCH control option to build.sh

Summary

Add command-line options to manually control the DYNAMIC_ARCH parameter in OpenBLAS compilation, allowing users to enable or disable dynamic CPU detection at build time.

Changes Made

1. build.sh

  • Added two new command-line options:
    • --enable-dynamic-arch: Enable dynamic CPU detection in OpenBLAS (default behavior)
    • --disable-dynamic-arch: Disable dynamic CPU detection in OpenBLAS
  • Initialized ENABLE_DYNAMIC_ARCH variable with default value 'ON'
  • Added parameter handling for both new options in the argument parsing section
  • Passed ENABLE_DYNAMIC_ARCH variable to BE and Cloud cmake build commands
  • Updated help documentation with usage examples and environment variable info

2. be/src/olap/rowset/segment_v2/ann_index/cmake-protect/CMakeLists.txt

  • Modified DYNAMIC_ARCH setting logic to support external ENABLE_DYNAMIC_ARCH variable
  • Added conditional check: if ENABLE_DYNAMIC_ARCH is defined, use its value; otherwise, use default (ON)
  • Maintained backward compatibility with existing behavior

Usage

Command-line options:

./build.sh --be --disable-dynamic-arch    # Disable DYNAMIC_ARCH
./build.sh --be --enable-dynamic-arch     # Enable DYNAMIC_ARCH (default)
./build.sh --be                           # Use default (ON)

@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

PR approved by anyone and no changes requested.

@doris-robot
Copy link

TPC-H: Total hot run time: 30352 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit e751d969ab60cb864ec38ea67e204a0a23c748d6, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17649	5200	4998	4998
q2	q3	10644	840	522	522
q4	4678	394	260	260
q5	7550	1240	1028	1028
q6	188	193	154	154
q7	851	894	675	675
q8	9296	1636	1480	1480
q9	5262	5119	5045	5045
q10	6926	1884	1646	1646
q11	473	267	246	246
q12	790	609	471	471
q13	17791	4466	3405	3405
q14	244	240	219	219
q15	990	794	786	786
q16	785	737	699	699
q17	721	912	426	426
q18	6103	5409	5329	5329
q19	1242	1106	690	690
q20	748	589	436	436
q21	4622	2202	1566	1566
q22	378	354	271	271
Total cold run time: 97931 ms
Total hot run time: 30352 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5856	5859	5855	5855
q2	q3	1982	2330	1780	1780
q4	1036	1379	831	831
q5	4334	4586	4629	4586
q6	210	192	151	151
q7	1869	1670	1540	1540
q8	2982	3107	2992	2992
q9	7850	7558	7512	7512
q10	2911	3050	2632	2632
q11	559	443	418	418
q12	563	648	455	455
q13	4296	4693	3579	3579
q14	290	307	285	285
q15	905	810	810	810
q16	742	957	723	723
q17	1458	1774	1395	1395
q18	7430	6897	6792	6792
q19	1003	937	887	887
q20	2114	2183	2026	2026
q21	4676	3845	3695	3695
q22	479	454	390	390
Total cold run time: 53545 ms
Total hot run time: 49334 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184583 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit e751d969ab60cb864ec38ea67e204a0a23c748d6, data reload: false

query5	4339	662	549	549
query6	326	226	219	219
query7	4234	473	280	280
query8	358	241	236	236
query9	8722	2786	2790	2786
query10	497	383	324	324
query11	17085	17403	17389	17389
query12	222	133	130	130
query13	1679	501	372	372
query14	6832	3397	3083	3083
query14_1	2989	2993	2967	2967
query15	209	193	172	172
query16	995	484	493	484
query17	1638	740	645	645
query18	3896	459	352	352
query19	224	235	196	196
query20	151	136	134	134
query21	216	168	131	131
query22	5671	4989	4675	4675
query23	17180	16740	16689	16689
query23_1	16690	16734	16610	16610
query24	7221	1635	1247	1247
query24_1	1231	1257	1229	1229
query25	553	458	404	404
query26	1238	262	161	161
query27	2762	492	286	286
query28	4457	1875	1905	1875
query29	786	557	476	476
query30	313	256	211	211
query31	882	727	635	635
query32	83	72	74	72
query33	520	345	280	280
query34	922	913	572	572
query35	659	685	604	604
query36	1086	1104	953	953
query37	142	108	84	84
query38	3034	2954	2863	2863
query39	900	875	856	856
query39_1	821	837	830	830
query40	240	159	146	146
query41	70	65	66	65
query42	114	106	106	106
query43	376	391	360	360
query44	
query45	203	200	185	185
query46	903	1002	643	643
query47	2125	2106	2030	2030
query48	325	339	246	246
query49	645	485	401	401
query50	718	300	231	231
query51	4104	4086	4049	4049
query52	113	112	104	104
query53	303	346	296	296
query54	322	288	285	285
query55	90	86	87	86
query56	340	341	332	332
query57	1350	1321	1258	1258
query58	314	298	296	296
query59	2637	2643	2523	2523
query60	353	358	348	348
query61	177	172	167	167
query62	639	600	558	558
query63	328	291	285	285
query64	4922	1278	985	985
query65	
query66	1387	450	348	348
query67	16366	16367	16288	16288
query68	
query69	393	317	283	283
query70	991	948	974	948
query71	350	326	314	314
query72	2733	2690	2526	2526
query73	553	572	323	323
query74	10018	9946	9717	9717
query75	2856	2743	2484	2484
query76	2314	1047	693	693
query77	369	425	321	321
query78	11342	11477	10670	10670
query79	2814	864	611	611
query80	1749	640	564	564
query81	565	276	247	247
query82	991	153	114	114
query83	336	267	246	246
query84	245	118	101	101
query85	880	495	441	441
query86	420	309	291	291
query87	3115	3125	3083	3083
query88	3634	2685	2704	2685
query89	442	371	351	351
query90	1965	207	176	176
query91	161	157	131	131
query92	80	80	72	72
query93	1197	875	520	520
query94	634	312	308	308
query95	588	399	315	315
query96	655	534	233	233
query97	2429	2517	2444	2444
query98	242	227	218	218
query99	1002	996	903	903
Total cold run time: 258833 ms
Total hot run time: 184583 ms

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.56% (19626/37337)
Line Coverage 36.18% (183202/506359)
Region Coverage 32.49% (142151/437574)
Branch Coverage 33.44% (61657/184364)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 51.11% (18687/36559)
Line Coverage 35.03% (176831/504806)
Region Coverage 30.97% (136810/441711)
Branch Coverage 32.23% (59609/184928)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants