-
Notifications
You must be signed in to change notification settings - Fork 449
Add BLOCK_LOAD_STRIPED and BLOCK_STORE_STRIPED #274
Conversation
This looks good, I'll plan to take a closer look sometime next week. Can you update the |
Thanks @allisonvacanti. Looks like everything passes. ...
Start 3: cub.cpp14.test.block_load_store.thorough
3/52 Test #3: cub.cpp14.test.block_load_store.thorough .............. Passed 0.14 sec
Start 4: cub.cpp14.test.block_load_store.benchmark
4/52 Test #4: cub.cpp14.test.block_load_store.benchmark ............. Passed 0.10 sec
... This PR covers our C2C scenarios. I need to think more about how R2C and C2R might work |
LGTM -- Starting tests. |
DVS CL: 29946764 |
gpuCI identified some issues building with nvcc+clang. @mnicely can you take a look? Looks like a missing member variable.
|
@canonizer I didn't need those for my use case, but I might not be hard to add... |
I'm getting a bunch of errors trying to build CUB and test this go-around. Maybe it's best we wait till after 1.13 has been released and revisit. ...
/home/belt/workStuff/git_examples/cub/thrust/dependencies/cub/cub/iterator/tex_ref_input_iterator.cuh(133): error #1215-D: function "tex1Dfetch(texture<T, 1, cudaReadModeElementType>, int) [with T=uint2]"
/usr/local/cuda/bin/../targets/x86_64-linux/include/texture_fetch_functions.h(132): here was declared deprecated
detected during:
instantiation of "T cub::<unnamed>::IteratorTexRef<T>::TexId<UNIQUE_ID>::Fetch(Distance) [with T=TestBar, UNIQUE_ID=554, Distance=ptrdiff_t]"
(299): here
instantiation of "cub::TexRefInputIterator<T, UNIQUE_ID, OffsetT>::reference cub::TexRefInputIterator<T, UNIQUE_ID, OffsetT>::operator*() const [with T=TestBar, UNIQUE_ID=554, OffsetT=ptrdiff_t]"
/home/belt/workStuff/git_examples/cub/thrust/dependencies/cub/test/test_iterator.cu(113): here
instantiation of "void Kernel(InputIteratorT, T *, InputIteratorT *) [with InputIteratorT=cub::TexRefInputIterator<TestBar, 554, ptrdiff_t>, T=TestBar]"
/home/belt/workStuff/git_examples/cub/thrust/dependencies/cub/test/test_iterator.cu(160): here
instantiation of "void Test(InputIteratorT, T (&)[TEST_VALUES]) [with InputIteratorT=cub::TexRefInputIterator<TestBar, 554, ptrdiff_t>, T=TestBar, TEST_VALUES=8]"
/home/belt/workStuff/git_examples/cub/thrust/dependencies/cub/test/test_iterator.cu(561): here
instantiation of "void TestTexRef<T,CastT>() [with T=TestBar, CastT=TestBar]"
/home/belt/workStuff/git_examples/cub/thrust/dependencies/cub/test/test_iterator.cu(694): here
instantiation of "void Test<T,CastT>(cub::Int2Type<0>) [with T=TestBar, CastT=TestBar]"
/home/belt/workStuff/git_examples/cub/thrust/dependencies/cub/test/test_iterator.cu(726): here
instantiation of "void Test<T>() [with T=TestBar]"
/home/belt/workStuff/git_examples/cub/thrust/dependencies/cub/test/test_iterator.cu(797): here
...
60 errors detected in the compilation of "/home/belt/workStuff/git_examples/cub/thrust/dependencies/cub/test/test_iterator.cu".
make[2]: *** [dependencies/cub/test/CMakeFiles/cub.cpp14.test.iterator.dir/build.make:76: dependencies/cub/test/CMakeFiles/cub.cpp14.test.iterator.dir/test_iterator.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:18203: dependencies/cub/test/CMakeFiles/cub.cpp14.test.iterator.dir/all] Error 2 |
Hmm, strange -- that error should be suppressed by our build system. It's just a deprecation warning and can be ignored. What platform are you seeing that on? |
I'm using CTK 11.3U1 and Ubuntu 20.04. I've merged in the latest from main into my branch and I'm using the updated build instructions. |
Should one of these be ON? THRUST_IGNORE_CUB_VERSION_CHECK:BOOL=OFF
THRUST_IGNORE_DEPRECATED_COMPILER:BOOL=OFF
THRUST_IGNORE_DEPRECATED_CPP_11:BOOL=OFF
THRUST_IGNORE_DEPRECATED_CPP_DIALECT:BOOL=OFF |
No, those affect other things. I'll look into it, but that's a known issue that shouldn't hold things up, and 1.13 probably won't fix it. Let me know if you are planning to add the other load algorithms Andy suggested, or if you want to leave that as future work. If you're finished with this patch for now, I'll restart the tests -- our CI seems to suppress the warning as intended, so we can just validate there. |
I think it'll be easier to hold off on We can revisit it later. I'll create a new PR and branch off 1.13 when it's released. |
Sounds good 👍🏻 I'll go ahead and start the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a bit more work -- @mnicely can you add the missing member variable?
TempStorage temp_storage;
needs to be added as a member to the new StoreInternal
specialization.
cub/block/block_store.cuh
Outdated
int valid_items) ///< [in] Number of valid items to write | ||
{ | ||
if (linear_tid == 0) | ||
temp_storage.valid_items = valid_items; // Move through volatile smem as a workaround to prevent RF spilling on subsequent loads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That last commit only added an initialization to the constructor, there still needs to be a temp_storage
member variable defined.
Thanks! This looks good to me, I should be able to land it in time for 1.13 👍 |
DVS CL: 30058071 |
Tests look good, merging. |
This PR adds the following to
BlockLoadAlgorithm
It's basically BLOCK_LOAD_TRANSPOSE without the BlockExchange
This PR adds the following to
BlockStoreAlgorithm
It's basically BLOCK_STORE_TRANSPOSE without the BlockExchange