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

add spawn cuda process testing #535

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

sichu2023
Copy link
Collaborator

No description provided.

assert tensor.item() == world_size * (world_size + 1) / 2


@pytest.mark.skipif(torch.cuda.device_count() > 1, reason=f"Requires 2 devices but got {torch.cuda.device_count()}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't this be skipif device_count() < 2?



def _test_all_reduce_sum(rank: int, world_size: int):
with dist_environment(rank=rank, world_size=world_size):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be nice to eventually not need any kind of mocking etc, and have some kind of vanilla comparison of results through some kind of standard lightning etc function that's distributed with different levels of different kinds of parallelism asserting that results are equal to the base case (DDP only).

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