Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect contribution ideas #1411

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions CONTRIBUTION_IDEAS.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!--
******************************************************************************
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/-->

# oneTBB Contribution Ideas
This file acts as a repository for potential contributions to the project.
It provides a centralized location where contributors can find tasks and features to work on,
helping to enhance the project. Its main purpose is to guide contributors towards areas where
they can make a positive impact on the project's development.

## Complexity Brackets
Tasks in this repository are categorized into three complexity brackets: Beginner, Intermediate, and Expert.
Each task is labeled with the appropriate complexity bracket to indicate the level of difficulty.

- Beginner:These tasks are suitable for contributors who are new to the project or have limited experience.
They involve relatively simple concepts and can be a good starting point for learning and getting familiar with the codebase.

- Intermediate: These tasks require a moderate level of knowledge and experience.
They may involve more complex features or require understanding of specific areas of the project.
Contributors with some experience in the project can take on these tasks to further develop their skills.

- Expert: These tasks are challenging and require advanced knowledge and expertise.
They often involve complex algorithms, performance optimizations, or deep understanding of the project's internals.
Contributors with extensive experience in the project can tackle these tasks to push the boundaries of the project's capabilities.

When choosing a task to work on, consider your skill level and the complexity bracket that best matches your expertise.
This will help ensure that you can make meaningful contributions and continue to grow as a developer.

## Beginner

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сonsider the following "beginner" task:

Suggested change
### Align symbol exporting rules across oneTBB libraries/plugins
oneTBB uses .def files to list global symbols to be exported and also local symbols to hide.
For example, TBBMalloc hides symbols from static libraries which is a result of compilation with Intel Compiler (see https://github.com/oneapi-src/oneTBB/blob/master/cmake/compilers/Intel.cmake#L34).
oneTBB library hides all symbols which are not listed in global section.
But other libraries like TBBBind, for example, for some reason does neither of these things and it may result in some symbol conflicts in them environment where multiple libraries depends on the same symbols.
The goal of this task is to align approaches across all of these libraries:
- Define local section with the symbols not meant for the exporting for each library.
- Analyze if is there any unintendedly exported symbols that are not related to the oneTBB libraries themselves. Consider hiding these symbols not in .def files but in the corresponding compiler CMake files.

### Cleanup the code base from redundant macros.
After the revamp from TBB to oneTBB, many macros were removed. However, some of them are still being used in the codebase.
Retrieve a list of macros used in the library and clean up any redundant ones.

### Introduce new examples.
You have the option to contribute a new example that you deem significant.
Alternatively, you can check library APIs that have not yet been covered and provide an example that addresses them.
Any example you provide should adhere to the style of the existing benchmarks.
Comment on lines +47 to +50
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering this as a "beginner" task, is it worth giving a hint on such possible API to have an example for?


### Stabilize examples performance.
Several oneTBB examples serve as performance benchmarks for the library. It's recommended to check the relative error for these examples.
If the error exceeds 5%, consider stabilizing the example to improve the reproducibility of results, while still maintaining a reasonable execution time.

## Intermediate

### C++ 20 Modules
With the introduction of C++ 20 Modules, it is worth analyzing the applicability of this feature to the oneTBB library.
Modules provide a more efficient and scalable way of organizing and managing code dependencies.
To get started, you can refer to the C++ 20 Modules documentation and familiarize yourself with the syntax and concepts.
Then, analyze the oneTBB codebase and propose a modularization strategy that aligns with the library's architecture.
Please do not forget to document your finding into oneTBB discussion page.

### NUMA related improvements
The oneTBB scheduler, by default, does not incorporate platform characteristics into its task scheduling.
You might want to enhance the scheduler's logic to take into account these platform characteristics.
For instance, you could refer to Hierarchical task stealing (#523) as a starting point.

## Expert

### Graceful degradation on thread creation failure.
On many Unix-like systems, `pthread_create` can fail spuriously even if
the running machine has enough resources to spawn a new thread (#824).
Consider reworking the thread creation process and avoid calling `std::terminate` if
`pthread_create` has failed. One question to consider is how to handle `task_arena::enqueue` guarantees.
Comment on lines +75 to +76
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The end goal of this task sounds pretty vague to me. Considering this as "expert" task, could you please elaborate more on what should be the output of this task?


Comment on lines +41 to +77
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider submitting a separate GH issue for each task from this list. That would allow to reference them in this file and have a further discussion on each task in a corresponding thread.

Loading