Skip to content

Remove deprecated workloads for examples/other directory#396

Open
nayyirahsan wants to merge 14 commits intokokkos:mainfrom
nayyirahsan:nayyirahsan/removeWorkloadsExtras
Open

Remove deprecated workloads for examples/other directory#396
nayyirahsan wants to merge 14 commits intokokkos:mainfrom
nayyirahsan:nayyirahsan/removeWorkloadsExtras

Conversation

@nayyirahsan
Copy link
Copy Markdown
Contributor

Continues #395 , converting remaining examples/ subdirectories to standalone style. Rewrites bfs_bottomup.py, binsort.py, classtypes.py, and subviews.py to use NumPy arrays and module-level workunits, removing all @pk.workload classes as part of the broader workload deprecation tracked in #326 .

@kennykos
Copy link
Copy Markdown
Collaborator

A CI like https://github.com/kokkos/pykokkos/pull/395/changes#diff-f25465d66485d3d4df54940b0956531859e73d7212e8ad78ddbecb34a35cc373 would be nice. However, maybe we should set it to a nightly run as not to waste resources. @IvanGrigorik, @JBludau do you have any thoughts on this?

@IvanGrigorik
Copy link
Copy Markdown
Collaborator

IvanGrigorik commented Mar 18, 2026

I am 100% agreed. Nightly builds are redundant, we can do it per PR

@nayyirahsan
Copy link
Copy Markdown
Contributor Author

I excluded examples/pykokkos/team_thread_mdrange.py from CI for now. It hits the same Kokkos::abort: Requested Team Size is too large! error as #395 .

@kennykos
Copy link
Copy Markdown
Collaborator

I excluded examples/pykokkos/team_thread_mdrange.py from CI for now. It hits the same Kokkos::abort: Requested Team Size is too large! error as #395 .

Thanks!

Could you open an issue with this error and link to this PR?

Then I'll do code review.

Copy link
Copy Markdown
Collaborator

@kennykos kennykos left a comment

Choose a reason for hiding this comment

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

This looks great, I have some minor suggestions so the code will run out-of-the-box on GPUs.

Comment thread examples/graphs/bfs_bottomup.py Outdated
Comment thread examples/pykokkos/binsort.py Outdated
Comment thread examples/pykokkos/subviews.py
nayyirahsan and others added 4 commits March 18, 2026 15:23
Co-authored-by: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com>
Co-authored-by: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com>
Co-authored-by: Gabriel Kosmacher <73120774+kennykos@users.noreply.github.com>
@kennykos
Copy link
Copy Markdown
Collaborator

@nayyirahsan I will push the fix to this branch, we just need to include DeviceExecutionSpace in

from .execution_space import (

Thats on me, I thought I did this in #389

Copy link
Copy Markdown
Collaborator

@kennykos kennykos left a comment

Choose a reason for hiding this comment

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

The work looks good so far, I've made some requests that should make the examples more helpful to a new pykokkos user.

Comment thread examples/pykokkos/classtypes.py
Comment thread examples/graphs/bfs_bottomup.py
Comment thread examples/pykokkos/subviews.py
Comment thread examples/pykokkos/binsort.py Outdated
Comment on lines +28 to +31
print(view)
print(permute_vector)
print(bin_offsets)
print(bin_count)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you add more detail to the print statements so the user knows what they are looking at when they run the script?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also, can you verify that lines 29-31 print something? My guess is that they print None, which is not the expected behavior. This is a larger issue with how functions are translated outside of workunits, @IvanGrigorik should take a look at https://github.com/kokkos/pykokkos/blob/2a483815c3315f34e382b5d61b0a97c8a8425437/pykokkos/interface/bin_sort.py and we should discuss what is going on here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirmed they print None since get_permute_vector(), get_bin_offsets(), and get_bin_count() are all stubs in bin_sort.py. The descriptive labels in the prints make it clear what each value is supposed to represent. Happy to open a separate issue for it

@kennykos kennykos added enhancement New feature or request maintenance labels Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants