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

[xla:cpu] Add OneDnnThreadPool based on parallel loop runner #22125

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

copybara-service[bot]
Copy link

[xla:cpu] Add OneDnnThreadPool based on parallel loop runner

inline void OneDnnThreadPool::parallel_for(
int n, const std::function<void(int, int)>& fn) {
runner_->Parallelize(
n, [fn](size_t task_index) { fn(task_index, task_index + 1); });
Copy link
Member

@penpornk penpornk Feb 4, 2025

Choose a reason for hiding this comment

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

Just a note that we'll change this to:

Suggested change
n, [fn](size_t task_index) { fn(task_index, task_index + 1); });
n, [fn](size_t task_index) { fn(task_index, n); });

@copybara-service copybara-service bot force-pushed the test_721606691 branch 4 times, most recently from cb567e7 to b1f2bd4 Compare February 8, 2025 17:51
@copybara-service copybara-service bot merged commit 8bac4a2 into main Feb 8, 2025
1 check passed
@copybara-service copybara-service bot deleted the test_721606691 branch February 8, 2025 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants