Skip to content

Conversation

@KristofferC
Copy link
Collaborator

These were removed in #472 and while I was a bit uncomfortable with it I did not protest. However, now after doing some benchmarks I see that this has a runtime cost that is very much nonsignificant.

Below is a profile and the big peaks are from seed!.

gnome-shell-screenshot-57lfk9

If I use the iteration-based seed function they completely disappear. In order to not break anything, I added these back but with a restriction to Array so that e.g. GPU arrays will keep using the broadcast based seeding.

@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.60%. Comparing base (1592fe9) to head (bafdb3b).
⚠️ Report is 48 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #634      +/-   ##
==========================================
+ Coverage   87.28%   87.60%   +0.32%     
==========================================
  Files          10       10              
  Lines         912      936      +24     
==========================================
+ Hits          796      820      +24     
  Misses        116      116              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@devmotion
Copy link
Member

I wonder if one could use map! instead of broadcasting? I would assume that this would still be GPU-compatible but possibly there is (almost) no runtime cost for Array?

@KristofferC
Copy link
Collaborator Author

Should check if this is still useful on later julia versions.

@devmotion
Copy link
Member

devmotion commented Aug 19, 2025

This was already fixed by #739, as far as I can tell. That PR reverted the seeding to an iteration-based approach for all arrays (which broke the - untested - GPU support...).

@KristofferC
Copy link
Collaborator Author

Thanks for the reference, I had missed that one.

@devmotion devmotion deleted the kc/iter_seed branch August 19, 2025 08:25
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.

3 participants