Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Checkpoint
  • Loading branch information
= committed Jul 11, 2021
commit 31fbd424487e4edcf38fc5a76fa31808515e990d
7 changes: 2 additions & 5 deletions nestedtensor/csrc/cuda/padding.cu
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,13 @@ void add_padding_3(
const int batch_id = blockIdx.y;
const int grid_id = blockIdx.x;
const int tid = threadIdx.x + grid_id * 256;
const int offset = offsets[batch_id];
const int* sizes_i = input_sizes + batch_id * input_dim;
const int numel_i = sizes_i[0] * sizes_i[1] * sizes_i[2];
const int output_offset = batch_id * output_numel;
const int sizes_0 = sizes_i[0];
const int sizes_1 = sizes_i[1];
const int sizes_2 = sizes_i[2];
const int sizes_1_2 = sizes_1 * sizes_2;
output = output + output_offset;
input = input + offset;
output = output + batch_id * output_numel;
input = input + offsets[batch_id];
int i = tid;
for (;i < output_numel;) {
const int i0 = i / (output_sizes_2_3);
Expand Down
4 changes: 2 additions & 2 deletions nestedtensor/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__version__ = '0.1.4+b4af654'
git_version = 'b4af6546cc11bf8458a0c69fb09d92f961eab014'
__version__ = '0.1.4+1fc28de'
git_version = '1fc28deca4c53569c7e43468617a3ea60e38d4fa'
from nestedtensor import _C
if hasattr(_C, 'CUDA_VERSION'):
cuda = _C.CUDA_VERSION