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

subDivideGridElems tests uses and generates invalid workdivs #2260

Open
mehmetyusufoglu opened this issue Apr 24, 2024 · 1 comment
Open

Comments

@mehmetyusufoglu
Copy link
Contributor

mehmetyusufoglu commented Apr 24, 2024

the test below is already in WorkDivHelpersTest.cpp. It shows that alpaka::subDivideGridElem produces a workdiv; in which threads per block exceeds device limits (device hard properties independent of the kernel).

For example in Nvidia devices can not have more than 1024 threads per block, but the function allows for 300x300 threads per block.

 CHECK(
            alpaka::subDivideGridElems(
                Vec{300, 600},
                Vec{1, 1},
                props,
                static_cast<Idx>(0u),
                true, // the argument blockThreadMustDivideGridThreadExtent
                alpaka::GridBlockExtentSubDivRestrictions::EqualExtent)
            == WorkDiv{Vec{1, 2}, Vec{300, 300}, Vec{1, 1}});   // 300x300 threads per block exceeds the device properties !!!

These definitions for the fixture of the test are wrong should be changed:
props.m_blockThreadExtentMax = Vec{256, 128};

@mehmetyusufoglu
Copy link
Contributor Author

mehmetyusufoglu commented Apr 24, 2024

I will solve this after merging

#2251

@mehmetyusufoglu mehmetyusufoglu changed the title subDivideGridElems generates invalid workdivs when blockThreadMustDivideGridThreadExtent is true subDivideGridElems tests uses and generates invalid workdivs Apr 24, 2024
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

No branches or pull requests

1 participant