Skip to content

Commit

Permalink
Remove legacy API based nvJPEG decoder implementation (NVIDIA#2591)
Browse files Browse the repository at this point in the history
Signed-off-by: Joaquin Anton <[email protected]>
  • Loading branch information
jantonguirao authored Jan 11, 2021
1 parent 27029bf commit 25ef92a
Show file tree
Hide file tree
Showing 44 changed files with 71 additions and 677 deletions.
4 changes: 0 additions & 4 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ if (BUILD_NVJPEG)
add_definitions(-DNVJPEG_LIBRARY_0_2_0)
endif()

if (${NVJPEG_DECOUPLED_API})
add_definitions(-DNVJPEG_DECOUPLED_API)
endif()

if (${NVJPEG_PREALLOCATE_API})
add_definitions(-DNVJPEG_PREALLOCATE_API)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindNVJPEG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if(NVJPEG_FOUND)
if (NVJPEG_DECOUPLED_API)
message("nvJPEG is using new API")
else()
message(WARNING " nvJPEG is using the deprecated API")
message(FATAL_ERROR "nvjpegBufferPinnedCreate is required but not present in the available version of nvJPEG")
endif()
else()
message("nvJPEG NOT found")
Expand Down
5 changes: 0 additions & 5 deletions dali/operators/decoder/image_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ DALI_SCHEMA(ImageDecoderAttr)
.AddOptionalArg("output_type",
R"code(The color space of the output image.)code",
DALI_RGB)
// TODO(janton): Remove this when we remove the old nvJPEGDecoder implementation (DALI-971)
#if !defined(NVJPEG_DECOUPLED_API)
.AddOptionalArg("use_batched_decode",
R"code(**`mixed` backend only** Use nvJPEG's batched decoding API.)code", false)
#endif
.AddOptionalArg("hybrid_huffman_threshold",
R"code(Applies **only** to the ``mixed`` backend type.
Expand Down
6 changes: 1 addition & 5 deletions dali/operators/decoder/nvjpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

if (NVJPEG_DECOUPLED_API)
add_subdirectory(decoupled_api)
else()
add_subdirectory(legacy_api)
endif()
add_subdirectory(fused)

collect_headers(DALI_INST_HDRS PARENT_SCOPE)
collect_sources(DALI_OPERATOR_SRCS PARENT_SCOPE)
Expand Down
19 changes: 0 additions & 19 deletions dali/operators/decoder/nvjpeg/decoupled_api/CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "dali/operators/decoder/nvjpeg/decoupled_api/fused/nvjpeg_decoder_cpu_crop.h"
#include "dali/operators/decoder/nvjpeg/fused/nvjpeg_decoder_cpu_crop.h"
#include <vector>

namespace dali {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CPU_CROP_H_
#define DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CPU_CROP_H_
#ifndef DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CPU_CROP_H_
#define DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CPU_CROP_H_

#include <vector>
#include "dali/operators/decoder/nvjpeg/decoupled_api/nvjpeg_decoder_cpu.h"
#include "dali/operators/decoder/nvjpeg/nvjpeg_decoder_cpu.h"
#include "dali/operators/image/crop/crop_attr.h"

namespace dali {
Expand All @@ -42,4 +42,4 @@ class nvJPEGDecoderCPUStageCrop : public nvJPEGDecoderCPUStage, protected CropAt

} // namespace dali

#endif // DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CPU_CROP_H_
#endif // DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CPU_CROP_H_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "dali/operators/decoder/nvjpeg/decoupled_api/fused/nvjpeg_decoder_cpu_random_crop.h"
#include "dali/operators/decoder/nvjpeg/fused/nvjpeg_decoder_cpu_random_crop.h"
#include <memory>
#include <vector>
#include "dali/util/random_crop_generator.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CPU_RANDOM_CROP_H_
#define DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CPU_RANDOM_CROP_H_
#ifndef DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CPU_RANDOM_CROP_H_
#define DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CPU_RANDOM_CROP_H_

#include "dali/operators/decoder/nvjpeg/decoupled_api/nvjpeg_decoder_cpu.h"
#include "dali/operators/decoder/nvjpeg/nvjpeg_decoder_cpu.h"
#include "dali/operators/image/crop/random_crop_attr.h"

namespace dali {
Expand All @@ -37,4 +37,4 @@ class nvJPEGDecoderCPUStageRandomCrop : public nvJPEGDecoderCPUStage, public Ran

} // namespace dali

#endif // DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CPU_RANDOM_CROP_H_
#endif // DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CPU_RANDOM_CROP_H_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "dali/operators/decoder/nvjpeg/decoupled_api/fused/nvjpeg_decoder_cpu_slice.h"
#include "dali/operators/decoder/nvjpeg/fused/nvjpeg_decoder_cpu_slice.h"
#include <vector>

namespace dali {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CPU_SLICE_H_
#define DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CPU_SLICE_H_
#ifndef DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CPU_SLICE_H_
#define DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CPU_SLICE_H_

#include <vector>
#include "dali/operators/decoder/nvjpeg/decoupled_api/nvjpeg_decoder_cpu.h"
#include "dali/operators/decoder/nvjpeg/nvjpeg_decoder_cpu.h"
#include "dali/operators/generic/slice/slice_attr.h"

namespace dali {
Expand Down Expand Up @@ -47,4 +47,4 @@ class nvJPEGDecoderCPUStageSlice : public nvJPEGDecoderCPUStage {

} // namespace dali

#endif // DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CPU_SLICE_H_
#endif // DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CPU_SLICE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#include <vector>
#include "dali/operators/decoder/nvjpeg/decoupled_api/fused/nvjpeg_decoder_crop.h"
#include "dali/operators/decoder/nvjpeg/fused/nvjpeg_decoder_crop.h"

namespace dali {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CROP_H_
#define DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CROP_H_
#ifndef DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CROP_H_
#define DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CROP_H_

#include <vector>
#include "dali/operators/decoder/nvjpeg/decoupled_api/nvjpeg_decoder_decoupled_api.h"
#include "dali/operators/decoder/nvjpeg/nvjpeg_decoder_decoupled_api.h"
#include "dali/operators/image/crop/crop_attr.h"

namespace dali {
Expand All @@ -42,4 +42,4 @@ class nvJPEGDecoderCrop : public nvJPEGDecoder, protected CropAttr {

} // namespace dali

#endif // DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_CROP_H_
#endif // DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_CROP_H_
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <vector>
#include <memory>
#include "dali/operators/decoder/nvjpeg/decoupled_api/fused/nvjpeg_decoder_random_crop.h"
#include "dali/operators/decoder/nvjpeg/fused/nvjpeg_decoder_random_crop.h"
#include "dali/util/random_crop_generator.h"

namespace dali {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_RANDOM_CROP_H_
#define DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_RANDOM_CROP_H_
#ifndef DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_RANDOM_CROP_H_
#define DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_RANDOM_CROP_H_

#include "dali/operators/decoder/nvjpeg/decoupled_api/nvjpeg_decoder_decoupled_api.h"
#include "dali/operators/decoder/nvjpeg/nvjpeg_decoder_decoupled_api.h"
#include "dali/operators/image/crop/random_crop_attr.h"

namespace dali {
Expand All @@ -37,4 +37,4 @@ class nvJPEGDecoderRandomCrop : public nvJPEGDecoder, public RandomCropAttr {

} // namespace dali

#endif // DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_RANDOM_CROP_H_
#endif // DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_RANDOM_CROP_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#include <vector>
#include "dali/operators/decoder/nvjpeg/decoupled_api/fused/nvjpeg_decoder_slice.h"
#include "dali/operators/decoder/nvjpeg/fused/nvjpeg_decoder_slice.h"

namespace dali {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_SLICE_H_
#define DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_SLICE_H_
#ifndef DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_SLICE_H_
#define DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_SLICE_H_

#include <vector>
#include "dali/operators/decoder/nvjpeg/decoupled_api/nvjpeg_decoder_decoupled_api.h"
#include "dali/operators/decoder/nvjpeg/nvjpeg_decoder_decoupled_api.h"
#include "dali/operators/generic/slice/slice_attr.h"

namespace dali {
Expand Down Expand Up @@ -47,4 +47,4 @@ class nvJPEGDecoderSlice : public nvJPEGDecoder {

} // namespace dali

#endif // DALI_OPERATORS_DECODER_NVJPEG_DECOUPLED_API_FUSED_NVJPEG_DECODER_SLICE_H_
#endif // DALI_OPERATORS_DECODER_NVJPEG_FUSED_NVJPEG_DECODER_SLICE_H_
17 changes: 0 additions & 17 deletions dali/operators/decoder/nvjpeg/legacy_api/CMakeLists.txt

This file was deleted.

22 changes: 0 additions & 22 deletions dali/operators/decoder/nvjpeg/legacy_api/nvjpeg_decoder.cc

This file was deleted.

Loading

0 comments on commit 25ef92a

Please sign in to comment.