Skip to content

Conversation

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Aug 15, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/133538

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (1 Unrelated Failure)

As of commit 6d10526 with merge base 32f3af7 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

[ghstack-poisoned]
Jiong Gong and others added 8 commits August 17, 2024 01:22
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
chunyuan-w and others added 5 commits September 5, 2024 21:05
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
}

std::tuple<std::shared_ptr<int64_t[]>, int> get_factors(int64_t number) {
thread_local std::map<int64_t, std::tuple<std::shared_ptr<int64_t[]>, int>> cache;
Copy link
Collaborator

@leslie-fang-intel leslie-fang-intel Sep 7, 2024

Choose a reason for hiding this comment

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

nit: why do we need to set this cache as thread_local? If multiple threads are running workloads, I think these threads can share these factors since it only relates to the number of threads for division. Is it due to the concern about initializing this cache with multi threads?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nit: why do we need to set this cache as thread_local? If multiple threads are running workloads, I think these threads can share these factors since it only relates to the number of threads for division. Is it due to the concern about initializing this cache with multi threads?

Yes, thread_local avoids the lock contention when multiple threads need to access and modify the cache.

[ghstack-poisoned]
@jgong5 jgong5 added ciflow/trunk Trigger trunk jobs on your pull request topic: not user facing topic category labels Sep 7, 2024
@jgong5
Copy link
Collaborator Author

jgong5 commented Sep 7, 2024

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@github-actions github-actions bot deleted the gh/jgong5/68/head branch October 9, 2024 02:04
KnAwnime pushed a commit to KnAwnime/Biblioteka that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants