hidden text to trigger early load of fonts ПродукцияПродукцияПродукцияПродукция Các sản phẩmCác sản phẩmCác sản phẩmCác sản phẩm المنتجاتالمنتجاتالمنتجاتالمنتجات מוצריםמוצריםמוצריםמוצרים
Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

receive_or_steal_task

firelight
初學者
1,248 檢視

Is it "normal" or expected for `tbb::internal::custom_scheduler::receive_or_steal_task` to be the most expensive function of given algorithm?

My guess is, since this is recursive work and it isn't very deep, `receive_or_steal_task` is where the scheduler loops waiting for more work. If it is highest in profiling, it would denote a lack of work? Am I reading this right?

0 積分
2 回應
Nikita_P_Intel
1,248 檢視

Hi, could you, please, describe an algorithm that you are talking about? But, in general, it is "not normal" that `tbb::internal::custom_scheduler::receive_or_steal_task` appears as the highest in profiling, which means (that you guessed right) the lack of work and underutilization of CPU resources (it should not depend on the recursive nature of an algorithm, I think). Try to increase your workload.

firelight
初學者
1,248 檢視

Thx for the clarification. The algorithm is recursive traversal of a KD Tree. Multi-threading it, even though threads are starving, did improve performance quite a bit. I can't really increase the workload, though it isn't a problem. I wanted to be sure this wasn't overhead from using tbb the wrong way. Whether or not I need to use the low-level tbb::task.

Good day

回覆