Skip to content

Commit

Permalink
Merge pull request #28 from NVIDIA/release_0_3_1
Browse files Browse the repository at this point in the history
Release 0.3.1. See CHANGELOG.md for changes.
  • Loading branch information
AndreasHeumann authored Jul 12, 2023
2 parents 76275ee + 5873d35 commit 19a1b94
Show file tree
Hide file tree
Showing 15 changed files with 64 additions and 32 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# clara-viz 0.3.1 (July 12 2023)

## Bug Fixes

* Gracefully disable OptiX denoiser if it can't be created
* make nvjpeg support optional

# clara-viz 0.3.0 (June 22 2023)

## Features
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ include(ExternalProject)

project(ClaraViz
DESCRIPTION "ClaraViz"
VERSION 0.3.0
VERSION 0.3.1
LANGUAGES CXX
)

Expand Down
Binary file modified bin/aarch64/ClaraVizRenderServer
Binary file not shown.
Binary file modified bin/x86_64/ClaraVizRenderServer
Binary file not shown.
4 changes: 2 additions & 2 deletions cmake/clara_viz_rendererConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ endif()
# Import target "clara::viz::renderer" for configuration "Release"
set_property(TARGET clara::viz::renderer APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(clara::viz::renderer PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${CMAKE_SYSTEM_PROCESSOR}/libclara_viz_renderer.so.0.3.0"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${CMAKE_SYSTEM_PROCESSOR}/libclara_viz_renderer.so.0.3.1"
IMPORTED_SONAME_RELEASE "libclara_viz_renderer.so.0"
)

list(APPEND _cmake_import_check_targets clara::viz::renderer )
list(APPEND _cmake_import_check_files_for_clara::viz::renderer "${_IMPORT_PREFIX}/lib/${CMAKE_SYSTEM_PROCESSOR}/libclara_viz_renderer.so.0.3.0" )
list(APPEND _cmake_import_check_files_for_clara::viz::renderer "${_IMPORT_PREFIX}/lib/${CMAKE_SYSTEM_PROCESSOR}/libclara_viz_renderer.so.0.3.1" )

# Cleanup temporary variables.
set(_IMPORT_PREFIX)
Expand Down
13 changes: 9 additions & 4 deletions cmake/clara_viz_rendererConfigVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
# The variable CVF_VERSION must be set before calling configure_file().


set(PACKAGE_VERSION "0.3.0")
set(PACKAGE_VERSION "0.3.1")

if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()

if("0.3.0" MATCHES "^([0-9]+)\\.")
if("0.3.1" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
endif()
else()
set(CVF_VERSION_MAJOR "0.3.0")
set(CVF_VERSION_MAJOR "0.3.1")
endif()

if(PACKAGE_FIND_VERSION_RANGE)
Expand Down Expand Up @@ -52,8 +52,13 @@ else()
endif()


# if the installed project requested no architecture check, don't perform the check
if("FALSE")
return()
endif()

# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if(CMAKE_SIZEOF_VOID_P STREQUAL "" OR "8" STREQUAL "")
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
return()
endif()

Expand Down
2 changes: 1 addition & 1 deletion lib/aarch64/libclara_viz_renderer.so.0
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/x86_64/libclara_viz_renderer.so.0
Binary file not shown.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.12)

project(ClaraVizServer
DESCRIPTION "ClaraVizServer"
VERSION 0.3.0
VERSION 0.3.1
LANGUAGES CXX
)

Expand Down
52 changes: 32 additions & 20 deletions src/claraviz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,23 @@ find_package(CUDAToolkit REQUIRED)
find_package(nvsharedmemory CONFIG)
find_package(ZLIB)

# nvidia-docker is not mapping nvjpeg into the image, prefer to link statically
find_cuda_helper_libs(nvjpeg_static)
if(CUDA_nvjpeg_static_LIBRARY)
message(STATUS "Found static nvjpeg lib")
set(nvjpeg_LIB CUDA::nvjpeg_static)
set(nvjpeg_FOUND TRUE)
else()
find_cuda_helper_libs(nvjpeg)
if(CUDA_nvjpeg_LIBRARY)
message(STATUS "Found shared nvjpeg lib")
set(nvjpeg_LIB CUDA::nvjpeg)
set(nvjpeg_FOUND TRUE)
else()
message(NOTICE "Could not find nvjpeg lib (neither shared nor static), JPEG encdoing support disabled")
endif()
endif()

enable_language(CUDA)

target_code_coverage(${PROJECT_NAME})
Expand All @@ -119,8 +136,6 @@ target_sources(${PROJECT_NAME}

hardware/cuda/Convert.cu

hardware/nvjpeg/NvJpegService.cpp

image/JpegEncoder.cpp

interface/DataInterface.cpp
Expand Down Expand Up @@ -151,31 +166,28 @@ if(ZLIB_FOUND)
)
endif()

if(nvjpeg_FOUND)
target_sources(${PROJECT_NAME}
PRIVATE
hardware/nvjpeg/NvJpegService.cpp
)
target_compile_definitions(${PROJECT_NAME}
PRIVATE
CLARA_VIZ_WITH_NVJPEG
)
target_link_libraries(${PROJECT_NAME}
PUBLIC
${nvjpeg_LIB}
)
endif()

target_link_libraries(${PROJECT_NAME}
PUBLIC
clara::viz::core
CUDA::cuda_driver
CUDA::cudart_static
)

# nvidia-docker is not mapping nvjpeg into the image, prefer to link statically
find_cuda_helper_libs(nvjpeg_static)
if(NOT CUDA_nvjpeg_static_LIBRARY)
find_cuda_helper_libs(nvjpeg)
if(NOT CUDA_nvjpeg_LIBRARY)
message(FATAL_ERROR "Could not find nvjpeg lib (neither shared nor static)")
endif()
target_link_libraries(${PROJECT_NAME}
PUBLIC
CUDA::nvjpeg
)
else()
target_link_libraries(${PROJECT_NAME}
PUBLIC
CUDA::nvjpeg_static
)
endif()

if (CLARA_VIZ_WITH_GRPC)
######################
# core grpc
Expand Down
8 changes: 8 additions & 0 deletions src/claraviz/image/JpegEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

#include "claraviz/hardware/cuda/Convert.h"
#include "claraviz/hardware/cuda/CudaService.h"
#ifdef CLARA_VIZ_WITH_NVJPEG
#include "claraviz/hardware/nvjpeg/NvJpegService.h"
#endif
#include "claraviz/util/Blob.h"

namespace clara::viz
Expand Down Expand Up @@ -63,9 +65,11 @@ class JpegEncoder::Impl
std::unique_ptr<CudaFunctionLauncher> convert_ABGR_to_YCbCr444CCIR601_;
std::unique_ptr<CudaMemory2D> buffer_ycbcr_;

#ifdef CLARA_VIZ_WITH_NVJPEG
UniqueNvJpegInstance instance_; ///< encoder instance
UniqueNvJpegEncoderState state_; ///< encoder state
UniqueNvJpegEncoderParams params_; ///< encoder params
#endif
};

JpegEncoder::JpegEncoder()
Expand Down Expand Up @@ -99,6 +103,7 @@ void JpegEncoder::Impl::Encode(uint32_t width, uint32_t height, Format format, c
throw InvalidArgument("memory") << "is a nullptr";
}

#ifdef CLARA_VIZ_WITH_NVJPEG
if (!convert_ABGR_to_YCbCr444CCIR601_)
{
convert_ABGR_to_YCbCr444CCIR601_ = GetConvertABGRToYCbCr444CCIR601Launcher();
Expand Down Expand Up @@ -165,6 +170,9 @@ void JpegEncoder::Impl::Encode(uint32_t width, uint32_t height, Format format, c
// retrieve the data
NvJpegCheck(
nvjpegEncodeRetrieveBitstream(instance_.get(), state_.get(), bitstream.data(), &length, CU_STREAM_PER_THREAD));
#else // CLARA_VIZ_WITH_NVJPEG
Log(LogLevel::Error) << "JPEG encoding not supported, nvjpeg library not found";
#endif // CLARA_VIZ_WITH_NVJPEG
}

} // namespace clara::viz
2 changes: 1 addition & 1 deletion src/examples/renderer/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "claraviz-example",
"version": "0.3.0",
"version": "0.3.1",
"description": "RenderServer example",
"dependencies": {
"@grpc/proto-loader": "^0.6.9",
Expand Down
2 changes: 1 addition & 1 deletion src/examples/volumestreamrenderer/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"dependencies": {
"@material-ui/core": "^4.11.0",
Expand Down

0 comments on commit 19a1b94

Please sign in to comment.