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 configuration to target CUDA compute capability 8.6 #3713

Merged
merged 3 commits into from
Jan 7, 2021

Conversation

keichi
Copy link
Contributor

@keichi keichi commented Jan 7, 2021

This PR adds a flag to compile Kokkos with CUDA compute capability 8.6 (changes are based on #3122). I need this because I'm working with Ampere-based RTX cards.

@dalg24-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

masterleinad
masterleinad previously approved these changes Jan 7, 2021
Copy link
Contributor

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

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

Looks good to me.

dalg24
dalg24 previously approved these changes Jan 7, 2021
@dalg24
Copy link
Member

dalg24 commented Jan 7, 2021

OK to test

@keichi
Copy link
Contributor Author

keichi commented Jan 7, 2021

I ran the unit tests on RTX3090 and the following tests in KokkosCore_UnitTest_Cuda2 failed.

test_team_policy_max_recommended<double, 2, policy_type_1024_2>(0);
test_team_policy_max_recommended<double, 2, policy_type_1024_2>(
max_scratch_size / 3 / 2);
test_team_policy_max_recommended<double, 2, policy_type_1024_2>(
max_scratch_size / 2);

test_team_policy_max_recommended<double, 16, policy_type_1024_2>(0);
test_team_policy_max_recommended<double, 16, policy_type_1024_2>(
max_scratch_size / 3 / 2);
test_team_policy_max_recommended<double, 16, policy_type_1024_2>(
max_scratch_size / 2);

After some debugging I figured out cuda_get_max_block_size() was returning zero. I think the reason is that properties.MaxThreadsPerBlock is 1536 on CC 8.6 while it's 2048 on other devices (I've tested on P100 and V100). I modified cuda_deduce_block_size() to account for that but I'm unsure if the fix is correct. Please review.

@dalg24 dalg24 dismissed stale reviews from masterleinad and themself January 7, 2021 16:31

Changes were added

Copy link
Member

@dalg24 dalg24 left a comment

Choose a reason for hiding this comment

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

LGTM

@crtrott crtrott merged commit 7f76f68 into kokkos:develop Jan 7, 2021
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.

None yet

5 participants