Commit Graph
32 Commits
Author SHA1 Message Date
Sun XiaoxiaandWanglei Shen 406593a6d8 Avoid unexpected scheduling to ECore on Hybrid Cores Windows platform (#21543)
* set core_type = MAIN_CORE_PROC with latency mode and enable hyper threading in pecore machine

* add test case

* change pcore_only to ecore_used

---------

Co-authored-by: Wanglei Shen <wanglei.shen@intel.com>
2023-12-15 11:24:43 +00:00
Sun Xiaoxia 9cca05def8 Only use current thread with TBB when -nstreams=0 (#20975)
* only use current thread when -nstreams=0 with TBB

* add comments

* fix building issue

* fix comments

* only use current thread when -nstreams=0 with TBB

* add comments

* fix building issue

* fix comments
2023-12-04 13:52:52 +08:00
Sun Xiaoxia 0bdd658317 Remove legacy threading code (#21279)
* remove legacy threading code

* fix code style
2023-11-27 18:45:34 +04:00
Sun Xiaoxia b7edd5df69 migrate threading related interface from API 1.0 to 2.0 (#21167)
* migrate threading related interface from API 1.0 to 2.0

* fix code style

* fix @ref issue in doc

* change <> to quotation marks

* restore threading related interface API 1.0

* restore the changes of legacy code
2023-11-24 10:52:44 +04:00
Sun Xiaoxia b9c64370fb Fix memory leak on windows (#20590) 2023-10-26 09:42:50 +04:00
Sun Xiaoxia c983b464ba enable cpu pinning on Windows by setting property affinity CORE (#19418)
* set enableCpuPinning=true by '-p YES'

* add test case of setting ov::Affinity::CORE

* add affinity=NUMA/HYBRID_AWARW

* fix build failure
2023-09-25 12:51:09 +08:00
Sun Xiaoxia 678e919b13 CPU pinning on Windows (#19405)
* add cpu pinning on windows

* remove pinning limitation on windows

* only support the machine with one numa node

* fix code style

* fix build error on macos

* set mask initial value

* fix test failure on window

* fix build failure on macos, add limitation on windows machine with two sockets

* fix test failure on windows

* fix test failure

* fix comments
2023-09-23 11:28:15 +08:00
Sun Xiaoxia 0ed1749ad9 [CPU] Removed socket id=-1 workaround on macOS (#18779) 2023-08-11 10:38:21 +04:00
Sun XiaoxiaandWanglei Shen 2dfb537bcb Xiaoxia/add get_socket_id interface based on threading2.0 (#18264)
* add streams_info_table init in the constructor of config

* add refresh _proc_type_table

* add get_org_proc_type_table

* add numa_node per stream in reserve_available_cpus()

* fix warning

* remove log

* fix code style

* fix gpu test build failed issue, modify debug info

* fix code style

* fix build failed on macos

* fix code style

* select socket in reserve cpu on 2 sockets platform

* fix build failed on macos

* modify numa node selecting in reserve_cpu_by_streams_info

* add test case

* fix code style

* modify test case

* fix core dump

* fix core dumped on pin=NUMA

* fix test failed on macos

* fix reserve cpu is wrong when streams_info_table=[1 1 36] proc_type_table=[36 18 0 18]

* add test case in LinuxCpuReserve

* modify test case

* add test case in cpu_reserve_test

* add cpu_stream_info_test

* modify enum

* fix test failed

* change int to size_t

* remove invalid code, fix running failed on macos

* modify LinuxCpuStreamType test case, move ie_cpu_streams_info.hpp to openvino/runtime/threading/

* fix code sytle

* modify enum name

* add comments in test case

* fix build issue

* change IE_ASSERT to OPENVINO_ASSERT

* fix test failed on macos and windows

* updated test cases due to the cpu mapping is changed

* enable numa_node_id and socket_id in streams_info_table

* fix code style issue

* fix document issue

* add get socket id interface

* fix segment fault on machine enabled socket_id=1 with numactl command

* fix numactl failed on four numa nodes machine

* remove compile warning

* fix numa_node_id=-1

* fix test case failed on macos

* fix test failed on macos

* fix numa_node_id=0 on macos

* Solve conflicts with master branch

* separate test cases for Linux and Mac/Windows

* update code style for windows compiler

* fix comments

* fix code style

* fix code style

* remove _plugin_mutex, fix comments

* fix code style

* fix code style

* add get_num_sockets

* fix cpu reserve issue in latency mode,ANY core on RPL machine

* add cpu reserve test case

---------

Co-authored-by: Wanglei Shen <wanglei.shen@intel.com>
2023-07-20 23:34:21 +08:00
Sun XiaoxiaandWanglei Shen 9e8d64bf70 Xiaoxia/update cpu mapping (#17451)
* generate cpu mapping table pre tbb

* change function name

* fix proc_type_table is wrong in RPL

* add getCpuMapFromCores test, fix comments

* modify test case

* fix comments

* fix code style

* add throw an exception

* fix numa_nodes=0 on ARM

* modify numa_nodes

* fix ExportOptimalNumStreams failed on ARM

* fix comments

* add discription of get_cpu_mapping_from_cores

* update for numactl support

* fix cores is wrong

---------

Co-authored-by: Wanglei Shen <wanglei.shen@intel.com>
2023-06-08 22:28:35 +08:00
Sun Xiaoxia ae1beb296e remove definition of static CPU (#17393)
* remove definition of static CPU

* revert old format

* definition of cpu_info covers macOS

* add lock in is_cpu_map_available
2023-05-17 12:08:38 +04:00
Sun Xiaoxia 8e675c71c8 fix binding wrong core with latency mode on i9-13900 (#17362) 2023-05-06 17:17:18 +08:00
Sun Xiaoxia 893b29eab4 HOT FIX: Xiaoxia/fix read wrong data in muti threading (#17240)
* fix threading test sporadic failure

* fix read wrong data in muti threading

* fix read and write sync

* add lock before cpu._cpu_mapping_table[i][CPU_MAP_USED_FLAG],because CPU_MAP_USED_FLAG may be modified by set_cpu_used
2023-04-27 22:44:44 +08:00
Sun XiaoxiaandWanglei Shen 7fc65ae3c5 fix threading test sporadic failure (#17230)
Co-authored-by: Wanglei Shen <wanglei.shen@intel.com>
2023-04-26 20:27:49 +04:00
Sun XiaoxiaandChen Peter 6663367183 Xiaoxia/fix performance regression (#17036)
* add _streams_info_table in Executor config

* change useHyperThreading init value

* restore cmake

* fix comments

* add calling enableCpuPinning property

* fix judgment about number of sockets in init_stream

* fix test case compile issue

* fix ci test case fail issue

* modify GetPerformanceStreams calling position

* add affinity in get_cpu_pinning

* modify ecore judgement

* add no binding core on ADL

* fix ci issue, add get_num_numa_nodes()

* fix code style

* fix StreamsHasHigherPriority issue

* fix according to comments

* fix performance degression

* fix code style

* code style

* fix warning

* fix ci test failed

* fix ImportNetwork issue

* fix ci test case issue

* fix smoke_CachingSupportCase_CPU issue

* add ExportOptimalNumStreamsTest test

* modify test name

* modify ExportOptimalNumStreams test

---------

Co-authored-by: Chen Peter <peter.chen@intel.com>
2023-04-25 04:35:47 +00:00
Sun Xiaoxia b22d0641cb fix streams is not correct by latency mode (#17101) 2023-04-21 09:21:14 +01:00
Sun XiaoxiaandWanglei Shen c186ffdf0d Xiaoxia/stream process refactor (#16692)
* add _streams_info_table in Executor config

* change useHyperThreading init value

* restore cmake

* fix comments

* add calling enableCpuPinning property

* fix judgment about number of sockets in init_stream

* fix test case compile issue

* fix ci test case fail issue

* modify GetPerformanceStreams calling position

* add affinity in get_cpu_pinning

* modify ecore judgement

* add no binding core on ADL

* fix ci issue, add get_num_numa_nodes()

* fix code style

* fix StreamsHasHigherPriority issue

* fix according to comments

* merge master

* fix build issue

* fix template plugin test case failed issue

* fix build issue

* fix cpu test failed

* Update plugin.cpp

---------

Co-authored-by: Wanglei Shen <wanglei.shen@intel.com>
2023-04-21 01:38:32 +00:00
Sun Xiaoxia 25058da48f Hot Fix: threading is disable with "threading=omp" (#16923)
* fix omp threading disable

* the divisor and dividend are reversed
2023-04-14 20:24:28 +04:00
Sun Xiaoxia f95fd27c16 HOT FIX: CPU binding cannot follow numactl's control (#16736)
* fix numactl command issue

* fix comments
2023-04-06 13:47:34 +08:00
Sun XiaoxiaandShen, Wanglei 988a8dd6a9 Xiaoxia/Optimize the streams calculation process (#15777)
* add _big_core_logic_streams

* modify core binding with cpu mapping table

* get _cpu_ids with querying cpu_mapping_table

* fix mac build issue

* fix cpu func test issue

* fix clang-format issue

* remove getCoreOffset and getThreadStep

* motify return false from cpuMapAvailable on windows

* remove core binding in latency mode

* add bind core on windows

* add model prefer threads

* modify streams calculating schedule in ApplyPerformanceHints

* modify MakeDefaultMultiThreaded and Stream

* add unified cpu binding with cpu_mapping on linux and windows. add GPU core binding interface. modify streams calculation scheduling

* fix code style issue

* modify default streams to 1 to fix ci test issue

* add SetStreamtoConfig, modify getNumOfAvailableCPUCores to fix continuous call loadnetwork issue

* modify code according to comments

* fix build issue on macos

* fix macos error

* fix cputest issue

* fix build issue on macos

* move features about CPU to lin_system_config.cpp

* fix code style

* fix bebian_arm build failed issue

* fix macos build issue

* fix code style

* fix test issue on windows

* fix code style

* add latency in hybrid_aware condition

* add the condition used all cores in latency mode

* fix code style

* fix code style

* add init_cpu

* fix code style

* fix streams=2 issue

* fix multi gpu core bind issue

* modify interface

* fix debian arm build issue

* add bind core in different socket

* fix code style

* fix build issue on windows

* fix GPU set_executor_config sync issue

* fix latency issue

* fix bind_cores issue

* modify model prefer on tigerlake machine

* modify according to comments

* fix code style

* modify GPU reserve CPU interface, remove bind core on windows feater

* fix code style

* add 3rd type core in cpu_mapping_table

* fix build issue

* update test case

* modify core bind behavior in latency mode

* remove 3rd core type function

* update format

* add lock in get_task_flag

* not bind core in latency mode

* change model_prefer to 0 with latency mode on core machine. bind core with latency mode on core machine

* remove a void thread

* modify condition of create task_area

* modify comments

* fix according to comments

* fix spelling mistake

* fix according to comments

* fix code style

---------

Co-authored-by: Shen, Wanglei <wanglei.shen@intel.com>
2023-03-29 18:26:27 +08:00
Sun Xiaoxia 4b80b4850c [CPU] Moved streams number computation to CPU plugin from IStreamsExecutor::Config (#14502) 2023-01-03 14:05:56 +00:00
Sun Xiaoxia 25ef748646 Modify statistical information threads on Latency mode (#14392) 2022-12-22 09:24:19 +04:00
Sun Xiaoxia f5e6816633 fix compilation of test fails on Android x86 (#14442) 2022-12-06 20:24:18 +04:00
9d8a03f90c Limit the scope of hybrid_aware throughput setting (#14054)
* fix custom setting nstreams doesn't work due to the logic changed in ApplyPerformanceHints

* add same limitation for latency mode

* change bind core method to binding full physical core first, then logical core

* update custom setting streams and threads

* fix corner case when threads_per_stream is 1

* fix with comments

* add condition of big core stream is zero when binding core

Co-authored-by: Shen, Wanglei <wanglei.shen@intel.com>
Co-authored-by: Chen Peter <peter.chen@intel.com>
2022-11-19 02:26:43 +03:00
Sun Xiaoxia 0cab188059 fix num_cores is all threads with numactl command on two sockets platform (#13487) 2022-11-17 13:11:18 +04:00
Sun XiaoxiaandShen, Wanglei 966548d061 Xiaoxia/Custom setting nstreams with hyper thread enabled on Hybrid-aware P/E-core (#13836)
* add HybridAware stream setting and core binding

* fix clang format issue

* unified code style, add parameter check

* correct input affinity skip NUMA, modify function name

* remove unnecessary floor

* fix ci compile issue on Mac/windows platform

* modify smoke_SetConfigAffinity test

* modify ov_core_set_and_get_property_enum test, affinity HYBRID_AWARE is changed to NUMA

* remove affinity correcting on this pr

* revert ov_core_test.cpp

* merge function by comments

* fix code style issue

* add custom nstreams setting, remove mutable qualifier

* fix code style issue

* fix some issues according to comments

* modify UpdateHybridCustomThreads

* fix code style issue

* modify comments

* use logic core in phase 2

* modify steams threads setting method

* add custom setting nstreams nthreads

* modify comments

* fix code style issue

* fix threads_per_stream_big is wrong in the some ADL machine which has 6 pcore

* add one condition that custom set nthreads but not set nstreams

* remove the limit to nstreams

* remove the feature in branch p_e_core_phase2_logic

* add comments

* rename num_small_cores to num_small_cores_phys

* fix code style issue

* fix thread number is wrong in corner case on 6Pcore and 10Pcore condition

* fix some condition which nstreams<2

* add check for config._threads_per_stream_big

Co-authored-by: Shen, Wanglei <wanglei.shen@intel.com>
2022-11-12 20:55:54 +03:00
Sun XiaoxiaandShen, Wanglei 73a8718b47 Xiaoxia/Default setting with hyper thread enabled on Hybrid-aware P/E-core (#13773)
* add HybridAware stream setting and core binding

* fix clang format issue

* unified code style, add parameter check

* correct input affinity skip NUMA, modify function name

* remove unnecessary floor

* fix ci compile issue on Mac/windows platform

* modify smoke_SetConfigAffinity test

* modify ov_core_set_and_get_property_enum test, affinity HYBRID_AWARE is changed to NUMA

* remove affinity correcting on this pr

* revert ov_core_test.cpp

* merge function by comments

* fix code style issue

* add custom nstreams setting, remove mutable qualifier

* fix code style issue

* fix some issues according to comments

* modify UpdateHybridCustomThreads

* fix code style issue

* modify comments

* use logic core in phase 2

* modify steams threads setting method

* move properties used in P/E-core to ie_internal_plugin_config.hpp

* fix streams is wrong on P/E-core which has 6 big cores

* modify code according to comments

* add threads_per_stream_small=3

* add the judgment of logical core

* fix code style issue

Co-authored-by: Shen, Wanglei <wanglei.shen@intel.com>
2022-11-08 21:18:23 +03:00
Sun Xiaoxia 0e60489df4 fix performance degradation on windows platform (#13705) 2022-10-29 02:57:18 +03:00
6d665e5b77 update tbb 2020 package which fix memory leak issue (#13552)
* update tbb version 2020.3 commitid is 617e9a71

* set USE_NEW_LOCATION TRUE

* modify SHA256

Co-authored-by: Chen Peter <peter.chen@intel.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2022-10-25 18:46:02 +04:00
Sun XiaoxiaandShen, Wanglei ec14dd3523 Hybrid-aware P/E Core optimization (#13435)
* add HybridAware stream setting and core binding

* fix clang format issue

* unified code style, add parameter check

* correct input affinity skip NUMA, modify function name

* remove unnecessary floor

* fix ci compile issue on Mac/windows platform

* modify smoke_SetConfigAffinity test

* modify ov_core_set_and_get_property_enum test, affinity HYBRID_AWARE is changed to NUMA

* remove affinity correcting on this pr

* revert ov_core_test.cpp

* merge function by comments

* fix code style issue

Co-authored-by: Shen, Wanglei <wanglei.shen@intel.com>
2022-10-24 22:26:22 +03:00
Sun XiaoxiaandIlya Lavrenov 756659b624 fix unicode issue that ie.ReadNetwork fails if the exe's folder conta… (#12720)
* fix unicode issue that ie.ReadNetwork fails if the exe's folder contains Chinese characters

* fix clang format issue

* fix clang format issue

* modify '/' to file_separator in get_directory

* fix ci issue

* fix test failure on windows

* fix test issue

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2022-08-30 12:12:37 +04:00
1dd13e2cf6 Xiaoxia/onetbb old version (#12303)
* support oneTBB old version

* fix oneTBB version mismatch issues

* fix clang issue

* add 'tbb' path to setupvars.sh and OpenVINOConfig.cmake.in

* Update scripts/setupvars/setupvars.sh

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: Shen, Wanglei <wanglei.shen@intel.com>
2022-07-27 16:49:53 +08:00