haojin2 commented on a change in pull request #14445: Speedup SequenceMask on
GPU
URL: https://github.com/apache/incubator-mxnet/pull/14445#discussion_r269364691
##########
File path: src/operator/sequence_mask.cu
##########
@@ -29,6 +29,65 @@
namespace mxnet {
namespace op {
+// (seqlen, batch, rest) case
+template <int req>
+struct SequenceMask0GPUKernel {
+ template <typename DType, typename IType>
+ MSHADOW_XINLINE static void Map(int i, DType *in, const IType *idx,
+ index_t max_s_len, index_t batch_size,
+ index_t restsize, DType value) {
+ index_t b = i / restsize % batch_size;
Review comment:
Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services