Skip to content

Commit

Permalink
Fixing issue for CUDA feautre extraction (#117)
Browse files Browse the repository at this point in the history
Using THROW_CHECK_EQ(options_.max_image_size, sift_gpu->GetMaxDimension()); causes issues for me when using CUDA as I don't seem to be able to set the parameter right. It seems wrong to me to expect that max_image_size is set to GetMaxDimension, as the latter will be device-dependent. Using THROW_CHECK_LE seems more appropriate.
  • Loading branch information
tsattler authored May 7, 2023
1 parent d251596 commit cbd3399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sift.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Sift {
#ifdef CUDA_ENABLED
template <typename dtype>
sift_output_t ExtractGPU(const pyimage_t<dtype>& image /* [h, w] */) {
THROW_CHECK_EQ(options_.max_image_size, sift_gpu->GetMaxDimension());
THROW_CHECK_LE(options_.max_image_size, sift_gpu->GetMaxDimension());
THROW_CHECK(!options_.estimate_affine_shape);
THROW_CHECK(!options_.domain_size_pooling);

Expand Down

0 comments on commit cbd3399

Please sign in to comment.