Skip to content

Commit 397f083

Browse files
Merge branch 'main' into feature/different-label-background
2 parents aee9bd1 + a8dc530 commit 397f083

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

.github/scripts/setup-env.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ case $(uname) in
2323
esac
2424

2525
echo '::group::Create build environment'
26-
# See https://github.com/pytorch/vision/issues/7296 for ffmpeg
2726
conda create \
2827
--name ci \
2928
--quiet --yes \
3029
python="${PYTHON_VERSION}" pip \
3130
ninja cmake \
3231
libpng \
33-
libwebp \
34-
'ffmpeg<4.3'
32+
libwebp
3533
conda activate ci
3634
conda install --quiet --yes libjpeg-turbo -c pytorch
3735
pip install --progress-bar=off --upgrade setuptools==72.1.0

packaging/pre_build_script.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then
1717
# Installing webp also installs a non-turbo jpeg, so we uninstall jpeg stuff
1818
# before re-installing them
1919
conda uninstall libjpeg-turbo libjpeg -y
20-
conda install -y ffmpeg=4.2 -c pytorch
2120
conda install -y libjpeg-turbo -c pytorch
2221

2322
# Copy binaries to be included in the wheel distribution
@@ -30,7 +29,7 @@ else
3029

3130
if [[ "$ARCH" == "aarch64" ]]; then
3231
conda install libpng -y
33-
conda install -y ffmpeg=4.2 libjpeg-turbo -c pytorch-nightly
32+
conda install -y libjpeg-turbo -c pytorch-nightly
3433
fi
3534

3635
conda install libwebp -y

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
# video decoding backends in torchvision. I'm renaming this to "gpu video
2929
# decoder" where possible, keeping user facing names (like the env var below) to
3030
# the old scheme for BC.
31-
USE_GPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_VIDEO_CODEC", "1") == "1"
31+
USE_GPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_VIDEO_CODEC", "0") == "1"
3232
# Same here: "use ffmpeg" was used to denote "use cpu video decoder".
33-
USE_CPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_FFMPEG", "1") == "1"
33+
USE_CPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_FFMPEG", "0") == "1"
3434

3535
TORCHVISION_INCLUDE = os.environ.get("TORCHVISION_INCLUDE", "")
3636
TORCHVISION_LIBRARY = os.environ.get("TORCHVISION_LIBRARY", "")

torchvision/csrc/ops/cuda/nms_kernel.cu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ __global__ void nms_kernel_impl(
3434
double iou_threshold,
3535
const T* dev_boxes,
3636
unsigned long long* dev_mask) {
37-
const int row_start = blockIdx.y;
38-
const int col_start = blockIdx.x;
37+
const auto row_start = blockIdx.y;
38+
const auto col_start = blockIdx.x;
3939

4040
if (row_start > col_start)
4141
return;
@@ -59,7 +59,7 @@ __global__ void nms_kernel_impl(
5959
__syncthreads();
6060

6161
if (threadIdx.x < row_size) {
62-
const int cur_box_idx = threadsPerBlock * row_start + threadIdx.x;
62+
const auto cur_box_idx = threadsPerBlock * row_start + threadIdx.x;
6363
const T* cur_box = dev_boxes + cur_box_idx * 4;
6464
int i = 0;
6565
unsigned long long t = 0;
@@ -84,7 +84,7 @@ __global__ static void gather_keep_from_mask(
8484
// Taken and adapted from mmcv
8585
// https://github.com/open-mmlab/mmcv/blob/03ce9208d18c0a63d7ffa087ea1c2f5661f2441a/mmcv/ops/csrc/common/cuda/nms_cuda_kernel.cuh#L76
8686
const int col_blocks = ceil_div(n_boxes, threadsPerBlock);
87-
const int thread_id = threadIdx.x;
87+
const auto thread_id = threadIdx.x;
8888

8989
// Mark the bboxes which have been removed.
9090
extern __shared__ unsigned long long removed[];

0 commit comments

Comments
 (0)