Skip to content

feat: disassemble IFRT array into shards for serialization #1136

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

avik-pal
Copy link
Collaborator

@avik-pal avik-pal commented Apr 5, 2025

No description provided.

@avik-pal avik-pal force-pushed the ap/save_sharded_array branch 2 times, most recently from 92c4775 to 12691ff Compare April 6, 2025 15:34
return [
mapping_unpadded[i] for
i in 1:length(mapping_unpadded) if isassigned(mapping_unpadded, i)
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

in the typical case that we have one array per process, we'll use something like

adev = Sharding.disassemble_into_single_device_arrays(a)
acpu = Array(adev[1])

is that right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I dont think you will have 1 array per process. If you have 4 gpus per node based on our current run configurations, you will have 4 arrays per process.

to get the arrays you can do [s => Array(x) for (s, x) in ret_val]. s is basically telling you the slice of this array as part of the global array

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah right ok thanks. per device, not per process

@avik-pal avik-pal force-pushed the ap/save_sharded_array branch from 1a6249c to 57f4b4f Compare April 7, 2025 19:04
@avik-pal avik-pal force-pushed the ap/save_sharded_array branch from 57f4b4f to 78aad81 Compare April 17, 2025 14:57
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