diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f64408..94b94ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index ed87a25..698176b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ include(ExternalProject) project(ClaraViz DESCRIPTION "ClaraViz" - VERSION 0.3.0 + VERSION 0.3.1 LANGUAGES CXX ) diff --git a/bin/aarch64/ClaraVizRenderServer b/bin/aarch64/ClaraVizRenderServer index 7fd5a9c..45d6cfb 100755 Binary files a/bin/aarch64/ClaraVizRenderServer and b/bin/aarch64/ClaraVizRenderServer differ diff --git a/bin/x86_64/ClaraVizRenderServer b/bin/x86_64/ClaraVizRenderServer index 2d3f99c..69366de 100755 Binary files a/bin/x86_64/ClaraVizRenderServer and b/bin/x86_64/ClaraVizRenderServer differ diff --git a/cmake/clara_viz_rendererConfig.cmake b/cmake/clara_viz_rendererConfig.cmake index 49b5c27..2af2fbc 100644 --- a/cmake/clara_viz_rendererConfig.cmake +++ b/cmake/clara_viz_rendererConfig.cmake @@ -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) diff --git a/cmake/clara_viz_rendererConfigVersion.cmake b/cmake/clara_viz_rendererConfigVersion.cmake index 33e59b4..c4a2747 100644 --- a/cmake/clara_viz_rendererConfigVersion.cmake +++ b/cmake/clara_viz_rendererConfigVersion.cmake @@ -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) @@ -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() diff --git a/lib/aarch64/libclara_viz_renderer.so.0 b/lib/aarch64/libclara_viz_renderer.so.0 index 0498d31..298bd85 120000 --- a/lib/aarch64/libclara_viz_renderer.so.0 +++ b/lib/aarch64/libclara_viz_renderer.so.0 @@ -1 +1 @@ -libclara_viz_renderer.so.0.3.0 \ No newline at end of file +libclara_viz_renderer.so.0.3.1 \ No newline at end of file diff --git a/lib/aarch64/libclara_viz_renderer.so.0.3.0 b/lib/aarch64/libclara_viz_renderer.so.0.3.1 similarity index 90% rename from lib/aarch64/libclara_viz_renderer.so.0.3.0 rename to lib/aarch64/libclara_viz_renderer.so.0.3.1 index cab0d28..5d61ec7 100644 Binary files a/lib/aarch64/libclara_viz_renderer.so.0.3.0 and b/lib/aarch64/libclara_viz_renderer.so.0.3.1 differ diff --git a/lib/x86_64/libclara_viz_renderer.so.0 b/lib/x86_64/libclara_viz_renderer.so.0 index 0498d31..298bd85 120000 --- a/lib/x86_64/libclara_viz_renderer.so.0 +++ b/lib/x86_64/libclara_viz_renderer.so.0 @@ -1 +1 @@ -libclara_viz_renderer.so.0.3.0 \ No newline at end of file +libclara_viz_renderer.so.0.3.1 \ No newline at end of file diff --git a/lib/x86_64/libclara_viz_renderer.so.0.3.0 b/lib/x86_64/libclara_viz_renderer.so.0.3.1 similarity index 88% rename from lib/x86_64/libclara_viz_renderer.so.0.3.0 rename to lib/x86_64/libclara_viz_renderer.so.0.3.1 index e05f9e5..0b8dc60 100755 Binary files a/lib/x86_64/libclara_viz_renderer.so.0.3.0 and b/lib/x86_64/libclara_viz_renderer.so.0.3.1 differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 727b151..a42f589 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.12) project(ClaraVizServer DESCRIPTION "ClaraVizServer" - VERSION 0.3.0 + VERSION 0.3.1 LANGUAGES CXX ) diff --git a/src/claraviz/CMakeLists.txt b/src/claraviz/CMakeLists.txt index 50fcd63..f25715e 100644 --- a/src/claraviz/CMakeLists.txt +++ b/src/claraviz/CMakeLists.txt @@ -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}) @@ -119,8 +136,6 @@ target_sources(${PROJECT_NAME} hardware/cuda/Convert.cu - hardware/nvjpeg/NvJpegService.cpp - image/JpegEncoder.cpp interface/DataInterface.cpp @@ -151,6 +166,21 @@ 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 @@ -158,24 +188,6 @@ target_link_libraries(${PROJECT_NAME} 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 diff --git a/src/claraviz/image/JpegEncoder.cpp b/src/claraviz/image/JpegEncoder.cpp index 30867bc..9535787 100644 --- a/src/claraviz/image/JpegEncoder.cpp +++ b/src/claraviz/image/JpegEncoder.cpp @@ -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 @@ -63,9 +65,11 @@ class JpegEncoder::Impl std::unique_ptr convert_ABGR_to_YCbCr444CCIR601_; std::unique_ptr buffer_ycbcr_; +#ifdef CLARA_VIZ_WITH_NVJPEG UniqueNvJpegInstance instance_; ///< encoder instance UniqueNvJpegEncoderState state_; ///< encoder state UniqueNvJpegEncoderParams params_; ///< encoder params +#endif }; JpegEncoder::JpegEncoder() @@ -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(); @@ -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 diff --git a/src/examples/renderer/ui/package.json b/src/examples/renderer/ui/package.json index 0224bc6..09ee66e 100644 --- a/src/examples/renderer/ui/package.json +++ b/src/examples/renderer/ui/package.json @@ -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", diff --git a/src/examples/volumestreamrenderer/ui/package.json b/src/examples/volumestreamrenderer/ui/package.json index 8bc54aa..721772c 100644 --- a/src/examples/volumestreamrenderer/ui/package.json +++ b/src/examples/volumestreamrenderer/ui/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "0.3.0", + "version": "0.3.1", "private": true, "dependencies": { "@material-ui/core": "^4.11.0",