From b0c23f4085175870df811b1e3868f810ce5f4550 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 14 Mar 2021 08:37:27 +0000 Subject: [PATCH 1/9] Updated version string --- CMakeLists.txt | 2 +- VERSION | 2 +- docs/conf.py | 2 +- setup.py | 2 +- vcpkg.json.opt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bebb2a545..0a317c68e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.4.1) -project(kompute VERSION 0.6.0) +project(kompute VERSION 0.7.0) set(CMAKE_CXX_STANDARD 14) diff --git a/VERSION b/VERSION index a918a2aa1..faef31a43 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.6.0 +0.7.0 diff --git a/docs/conf.py b/docs/conf.py index f5910ed56..28d2704e2 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,7 +27,7 @@ html_title = "Vulkan Kompute Documentation (Python & C++)" author = 'Alejandro Saucedo' # The full version, including alpha/beta/rc tags -release = '0.6.0' +release = '0.7.0' # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index 733c4c185..bb44423c9 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ class CMakeBuild(build_ext): setup( name='kp', - version='0.6.0', + version='0.7.0', author='Alejandro Saucedo', description='Vulkan Kompute: Blazing fast, mobile-enabled, asynchronous, and optimized for advanced GPU processing usecases.', long_description=long_description, diff --git a/vcpkg.json.opt b/vcpkg.json.opt index b8da49533..e2db75236 100644 --- a/vcpkg.json.opt +++ b/vcpkg.json.opt @@ -1,6 +1,6 @@ { "name": "example", - "version-string": "0.6.0", + "version-string": "0.7.0", "dependencies": [ "fmt", "spdlog", From 282326e8b86be6f8d1f4d91e4520a00be57c059c Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 14 Mar 2021 08:44:52 +0000 Subject: [PATCH 2/9] Updated changelog and added further documentation on release --- CHANGELOG.md | 74 ++++++++++++++++++++++++++++++++++++-- Makefile | 2 +- docs/overview/ci-tests.rst | 5 +-- 3 files changed, 74 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f98612d3c..b85f4e1de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,76 @@ # Changelog -## [v0.6.0](https://github.com/EthicalML/vulkan-kompute/tree/v0.6.0) +## [v0.7.0](https://github.com/EthicalML/vulkan-kompute/tree/v0.7.0) + +[Full Changelog](https://github.com/EthicalML/vulkan-kompute/compare/v0.6.0...v0.7.0) + +**Implemented enhancements:** + +- Extend non-spdlog print functions to use std::format [\#158](https://github.com/EthicalML/vulkan-kompute/issues/158) +- Add code coverage reports with codecov [\#145](https://github.com/EthicalML/vulkan-kompute/issues/145) +- Explore removing `std::vector mData;` completely from Tensor in favour of always storing data in hostVisible buffer memory \(TBC\) [\#144](https://github.com/EthicalML/vulkan-kompute/issues/144) +- Update all examples to match breaking changes in 0.7.0 [\#141](https://github.com/EthicalML/vulkan-kompute/issues/141) +- Avoid copy when returning python numpy / array [\#139](https://github.com/EthicalML/vulkan-kompute/issues/139) +- Cover all Python & C++ tests in CI [\#121](https://github.com/EthicalML/vulkan-kompute/issues/121) +- Add C++ Test for Simple Work Groups Example [\#117](https://github.com/EthicalML/vulkan-kompute/issues/117) +- Expose push constants in OpAlgo [\#54](https://github.com/EthicalML/vulkan-kompute/issues/54) +- Expose ability to create barriers in OpTensor operations [\#45](https://github.com/EthicalML/vulkan-kompute/issues/45) +- Create delete function in manager to free / destroy sequence [\#36](https://github.com/EthicalML/vulkan-kompute/issues/36) +- Make specialisation data extensible [\#12](https://github.com/EthicalML/vulkan-kompute/issues/12) +- Support multiple types for Kompute Tensors [\#2](https://github.com/EthicalML/vulkan-kompute/issues/2) +- Added re-record sequence functionality and updated docs [\#171](https://github.com/EthicalML/vulkan-kompute/pull/171) ([axsaucedo](https://github.com/axsaucedo)) +- Extend non-spdlog print functions to use fmt::format / fmt::print [\#159](https://github.com/EthicalML/vulkan-kompute/pull/159) ([axsaucedo](https://github.com/axsaucedo)) +- Added support for custom SpecializedConstants and removed KomputeWorkgroup class [\#151](https://github.com/EthicalML/vulkan-kompute/pull/151) ([axsaucedo](https://github.com/axsaucedo)) +- Added destroy functions for tensors and sequences \(named and object\) [\#146](https://github.com/EthicalML/vulkan-kompute/pull/146) ([axsaucedo](https://github.com/axsaucedo)) + +**Fixed bugs:** + +- push\_constant not working in my case? [\#168](https://github.com/EthicalML/vulkan-kompute/issues/168) +- DescriptorPool set is not being freed [\#155](https://github.com/EthicalML/vulkan-kompute/issues/155) +- Updated memory barriers to include staging buffers [\#182](https://github.com/EthicalML/vulkan-kompute/pull/182) ([axsaucedo](https://github.com/axsaucedo)) +- Adds push const ranges in pipelinelayout to fix \#168 [\#174](https://github.com/EthicalML/vulkan-kompute/pull/174) ([axsaucedo](https://github.com/axsaucedo)) +- Added destructor for staging tensors [\#134](https://github.com/EthicalML/vulkan-kompute/pull/134) ([axsaucedo](https://github.com/axsaucedo)) + +**Closed issues:** + +- Update memory barriers to align with tensor staging/primary memory revamp [\#181](https://github.com/EthicalML/vulkan-kompute/issues/181) +- Move shader defaultResource inside kp::Shader class [\#175](https://github.com/EthicalML/vulkan-kompute/issues/175) +- Reach at least 90% code coverage on tests [\#170](https://github.com/EthicalML/vulkan-kompute/issues/170) +- Add functionality to re-record sequence as now it's possible to update the underlying algorithm [\#169](https://github.com/EthicalML/vulkan-kompute/issues/169) +- Use numpy arrays as default return value [\#166](https://github.com/EthicalML/vulkan-kompute/issues/166) +- Update all shared\_ptr value passes to be by ref or const ref [\#161](https://github.com/EthicalML/vulkan-kompute/issues/161) +- Amend memory hierarchy for kp::Operations so they can be created separately [\#160](https://github.com/EthicalML/vulkan-kompute/issues/160) +- Customise theme of documentation [\#156](https://github.com/EthicalML/vulkan-kompute/issues/156) +- Remove KomputeWorkgroup class in favour of std::array\ [\#152](https://github.com/EthicalML/vulkan-kompute/issues/152) +- Passing raw GLSL string to Shader Module depricated so remove this method from supported approach [\#150](https://github.com/EthicalML/vulkan-kompute/issues/150) +- Add python backwards compatibility for eval\_tensor\_create\_def [\#147](https://github.com/EthicalML/vulkan-kompute/issues/147) +- Document breaking changes for 0.7.0 [\#140](https://github.com/EthicalML/vulkan-kompute/issues/140) +- Tensor memory management and memory hierarchy redesign [\#136](https://github.com/EthicalML/vulkan-kompute/issues/136) +- Staging tensor GPU memory is not freed as part of OpCreateTensor removal [\#133](https://github.com/EthicalML/vulkan-kompute/issues/133) +- eStorage Tensors are currently unusable as OpTensorCreate calls mapDataIntoHostMemory [\#132](https://github.com/EthicalML/vulkan-kompute/issues/132) +- 0.6.0 Release [\#126](https://github.com/EthicalML/vulkan-kompute/issues/126) +- java.lang.UnsatisfiedLinkError: dlopen failed: library "libkompute-jni.so" not found [\#125](https://github.com/EthicalML/vulkan-kompute/issues/125) +- Initial exploration: Include explicit GLSL to SPIRV compilation [\#107](https://github.com/EthicalML/vulkan-kompute/issues/107) +- Add support for push constants [\#106](https://github.com/EthicalML/vulkan-kompute/issues/106) + +**Merged pull requests:** + +- Resolve moving all functions from tensor HPP to CPP [\#186](https://github.com/EthicalML/vulkan-kompute/pull/186) ([axsaucedo](https://github.com/axsaucedo)) +- Device Properties [\#184](https://github.com/EthicalML/vulkan-kompute/pull/184) ([alexander-g](https://github.com/alexander-g)) +- Too many warnings [\#183](https://github.com/EthicalML/vulkan-kompute/pull/183) ([alexander-g](https://github.com/alexander-g)) +- Add support for bool, double, int32, uint32 and float32 on Tensors via TensorT [\#177](https://github.com/EthicalML/vulkan-kompute/pull/177) ([axsaucedo](https://github.com/axsaucedo)) +- Support for Timestamping [\#176](https://github.com/EthicalML/vulkan-kompute/pull/176) ([alexander-g](https://github.com/alexander-g)) +- Test for ShaderResources [\#165](https://github.com/EthicalML/vulkan-kompute/pull/165) ([aliPMPAINT](https://github.com/aliPMPAINT)) +- Amend memory hierarchy to enable for push constants and functional interface for more flexible operations [\#164](https://github.com/EthicalML/vulkan-kompute/pull/164) ([axsaucedo](https://github.com/axsaucedo)) +- made changes for include paths for complete installation [\#163](https://github.com/EthicalML/vulkan-kompute/pull/163) ([aliPMPAINT](https://github.com/aliPMPAINT)) +- Added dark mode on docs [\#157](https://github.com/EthicalML/vulkan-kompute/pull/157) ([axsaucedo](https://github.com/axsaucedo)) +- Glslang implementation for online shader compilation [\#154](https://github.com/EthicalML/vulkan-kompute/pull/154) ([axsaucedo](https://github.com/axsaucedo)) +- Adding test code coverage using gcov and lcov [\#149](https://github.com/EthicalML/vulkan-kompute/pull/149) ([axsaucedo](https://github.com/axsaucedo)) +- Added temporary backwards compatibility for eval\_tensor\_create\_def function [\#148](https://github.com/EthicalML/vulkan-kompute/pull/148) ([axsaucedo](https://github.com/axsaucedo)) +- Amend memory ownership hierarchy to have Tensor owned by Manager instead of OpCreateTensor / OpBase [\#138](https://github.com/EthicalML/vulkan-kompute/pull/138) ([axsaucedo](https://github.com/axsaucedo)) +- Removed Staging Tensors in favour of having two buffer & memory in a Tensor to minimise data transfer [\#137](https://github.com/EthicalML/vulkan-kompute/pull/137) ([axsaucedo](https://github.com/axsaucedo)) + +## [v0.6.0](https://github.com/EthicalML/vulkan-kompute/tree/v0.6.0) (2021-01-31) [Full Changelog](https://github.com/EthicalML/vulkan-kompute/compare/v0.5.1...v0.6.0) @@ -49,7 +119,6 @@ - Remove the template params from OpAlgoBase for dispatch layout [\#57](https://github.com/EthicalML/vulkan-kompute/issues/57) - Enable layout to be configured dynamically within shaders [\#26](https://github.com/EthicalML/vulkan-kompute/issues/26) - replaced "static unsigned const" to "static const unsigned" to avoid SWIG parsing error. [\#95](https://github.com/EthicalML/vulkan-kompute/pull/95) ([0x0f0f0f](https://github.com/0x0f0f0f)) -- Added python bindings with kp as python module [\#88](https://github.com/EthicalML/vulkan-kompute/pull/88) ([axsaucedo](https://github.com/axsaucedo)) **Closed issues:** @@ -69,6 +138,7 @@ - Adding Python package for Kompute [\#87](https://github.com/EthicalML/vulkan-kompute/issues/87) - Python shader extension [\#91](https://github.com/EthicalML/vulkan-kompute/pull/91) ([axsaucedo](https://github.com/axsaucedo)) - Enhanced python build [\#89](https://github.com/EthicalML/vulkan-kompute/pull/89) ([axsaucedo](https://github.com/axsaucedo)) +- Added python bindings with kp as python module [\#88](https://github.com/EthicalML/vulkan-kompute/pull/88) ([axsaucedo](https://github.com/axsaucedo)) **Closed issues:** diff --git a/Makefile b/Makefile index 9fdcbdcbe..8a81663bf 100644 --- a/Makefile +++ b/Makefile @@ -199,4 +199,4 @@ format: build_changelog: docker run --rm -it -v "$(PWD)":/usr/local/src/your-app -e CHANGELOG_GITHUB_TOKEN=${CHANGELOG_GITHUB_TOKEN} ferrarimarco/github-changelog-generator:1.15.2 -u EthicalML -p vulkan-kompute chmod 664 CHANGELOG.md # (Read+Write, Read+Write, Read) - sed -i -e 's/\(HEAD\|Unreleased\)/v0.6.0/g' CHANGELOG.md # Replacing unreleased version with latest tag + sed -i -e 's/\(HEAD\|Unreleased\)/v${VERSION}/g' CHANGELOG.md # Replacing unreleased version with latest tag diff --git a/docs/overview/ci-tests.rst b/docs/overview/ci-tests.rst index abda9479b..4afc1f0ce 100644 --- a/docs/overview/ci-tests.rst +++ b/docs/overview/ci-tests.rst @@ -81,6 +81,7 @@ Performing Release In order to perform the release the following steps need to be carried out: * Build changelog + * Create branch called `v-release` * Generate latest changelog `make build_changelog` * Update latest tag in new CHANGELOG.md to be the vesion to release * Python Release @@ -98,7 +99,3 @@ In order to perform the release the following steps need to be carried out: * Ensure all tests pass in GPU and CPU: `python -m pytest` -``` -``` - - From 6bab776b0389febd05d2cc6ed3a3650ffa68cbb0 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 14 Mar 2021 09:41:17 +0000 Subject: [PATCH 3/9] Added options to build dependencies as shared or static lib --- CMakeLists.txt | 12 +++++++++++- docs/overview/build-system.rst | 4 ++++ src/CMakeLists.txt | 12 +++++++++--- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a317c68e..8f23fc622 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,8 @@ option(KOMPUTE_OPT_REPO_SUBMODULE_BUILD, "Use the submodule repos instead of ext option(KOMPUTE_OPT_ANDOID_BUILD "Enable android compilation flags required" 0) option(KOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS "Explicitly disable debug layers even on debug" 0) option(KOMPUTE_OPT_DISABLE_SHADER_UTILS "Remove shader util code and dependencies including glslang" 0) +option(KOMPUTE_OPT_DEPENDENCIES_SHARED_LIBS "Whether to use shared libraries for dependencies for install" 0) +option(KOMPUTE_OPT_BUILD_AS_SHARED_LIB "Whether to build kompute as shared library" 0) # Build flags set(KOMPUTE_EXTRA_CXX_FLAGS "" CACHE STRING "Extra compile flags for Kompute, see docs for full list") @@ -29,6 +31,10 @@ if(KOMPUTE_OPT_ENABLE_SPDLOG) if(KOMPUTE_OPT_INSTALL) # Enable install parameters for spdlog (overrides parameters passed) set(SPDLOG_INSTALL ON CACHE BOOL "Enables install of spdlot" FORCE) + + if(KOMPUTE_OPT_DEPENDENCIES_SHARED_LIBS) + set(SPDLOG_BUILD_SHARED ON CACHE BOOL "Enables build of shared libraries" FORCE) + endif() endif() endif() @@ -54,7 +60,11 @@ if(NOT KOMPUTE_OPT_DISABLE_SHADER_UTILS) # Enable install parameters for glslang (overrides parameters passed) # When install is enabled the glslang libraries become shared set(ENABLE_GLSLANG_INSTALL ON CACHE BOOL "Enables install of glslang" FORCE) - set(BUILD_SHARED_LIBS ON CACHE BOOL "Enables build of shared libraries" FORCE) + + # By default we enable shared library based installation + if(KOMPUTE_OPT_DEPENDENCIES_SHARED_LIBS) + set(BUILD_SHARED_LIBS ON CACHE BOOL "Enables build of shared libraries" FORCE) + endif() endif() else() set(KOMPUTE_EXTRA_CXX_FLAGS "${KOMPUTE_EXTRA_CXX_FLAGS} -DKOMPUTE_DISABLE_SHADER_UTILS=1") diff --git a/docs/overview/build-system.rst b/docs/overview/build-system.rst index 620711cc4..cb6933ba4 100644 --- a/docs/overview/build-system.rst +++ b/docs/overview/build-system.rst @@ -33,6 +33,10 @@ This by default configures without any of the extra build tasks (such as buildin - Disables the install step in the cmake file (useful for android build) * - -DKOMPUTE_OPT_ANDROID_BUILD=1 - Enables android build which includes and excludes relevant libraries + * - -DKOMPUTE_OPT_DEPENDENCIES_SHARED_LIBS=1 + - Ensures dependencies are referenced as shared libraries for kompute install + * - -DKOMPUTE_OPT_BUILD_AS_SHARED_LIB=1 + - Whether to build Kompute as shared lib instead of static Compile Flags diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 950f95896..102d9527d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,9 +39,15 @@ if(KOMPUTE_OPT_ANDOID_BUILD) ${PROJECT_SOURCE_DIR}/vk_ndk_wrapper_include/kompute_vk_ndk_wrapper.cpp) endif() -add_library( - kompute STATIC - ${kompute_CPP}) +if(NOT KOMPUTE_OPT_BUILD_AS_SHARED_LIB) + add_library( + kompute STATIC + ${kompute_CPP}) +else() + add_library( + kompute SHARED + ${kompute_CPP}) +endif() target_include_directories( kompute PUBLIC From 953dc54cb5443048f367130dfbcee2fade8493c4 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 14 Mar 2021 09:56:47 +0000 Subject: [PATCH 4/9] Updated scope of the dependencies to include in install --- src/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 102d9527d..7280dc88d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,7 +57,7 @@ target_include_directories( if(NOT KOMPUTE_OPT_ANDOID_BUILD) target_link_libraries( - kompute + kompute PRIVATE Vulkan::Vulkan ) else() @@ -87,7 +87,7 @@ else() endif() target_link_libraries( - kompute + kompute PUBLIC fmt::fmt ) @@ -103,7 +103,7 @@ if(KOMPUTE_OPT_ENABLE_SPDLOG) endif() target_link_libraries( - kompute + kompute PUBLIC spdlog::spdlog ) endif() @@ -114,7 +114,7 @@ endif() if(KOMPUTE_OPT_ANDOID_BUILD) target_link_libraries( - kompute + kompute PRIVATE kompute_vk_ndk_wrapper log android @@ -152,7 +152,8 @@ if(NOT KOMPUTE_OPT_DISABLE_SHADER_UTILS) kompute PRIVATE ${PROJECT_SOURCE_DIR}/external/glslang) - target_link_libraries(kompute + target_link_libraries( + kompute PUBLIC # Not including hlsl support # HLSL # glslang includes OGLCompiler, OSDependent, MachineIndependent @@ -165,7 +166,8 @@ if(NOT KOMPUTE_OPT_DISABLE_SHADER_UTILS) kompute PRIVATE ${GLSLANG_GENERATED_INCLUDEDIR}) - target_link_libraries(kompute + target_link_libraries( + kompute PUBLIC # Not including hlsl support # glslang::HLSL # Adding explicit dependencies to match above From 4e1ef1fae8424d2e30efc00c4892c75cf397a21d Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 14 Mar 2021 10:08:32 +0000 Subject: [PATCH 5/9] Removed scope classifier for library dependencies --- src/CMakeLists.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7280dc88d..3488c1bd8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,7 +57,7 @@ target_include_directories( if(NOT KOMPUTE_OPT_ANDOID_BUILD) target_link_libraries( - kompute PRIVATE + kompute Vulkan::Vulkan ) else() @@ -87,7 +87,7 @@ else() endif() target_link_libraries( - kompute PUBLIC + kompute fmt::fmt ) @@ -103,7 +103,7 @@ if(KOMPUTE_OPT_ENABLE_SPDLOG) endif() target_link_libraries( - kompute PUBLIC + kompute spdlog::spdlog ) endif() @@ -114,7 +114,7 @@ endif() if(KOMPUTE_OPT_ANDOID_BUILD) target_link_libraries( - kompute PRIVATE + kompute kompute_vk_ndk_wrapper log android @@ -152,8 +152,7 @@ if(NOT KOMPUTE_OPT_DISABLE_SHADER_UTILS) kompute PRIVATE ${PROJECT_SOURCE_DIR}/external/glslang) - target_link_libraries( - kompute PUBLIC + target_link_libraries(kompute # Not including hlsl support # HLSL # glslang includes OGLCompiler, OSDependent, MachineIndependent @@ -166,8 +165,7 @@ if(NOT KOMPUTE_OPT_DISABLE_SHADER_UTILS) kompute PRIVATE ${GLSLANG_GENERATED_INCLUDEDIR}) - target_link_libraries( - kompute PUBLIC + target_link_libraries(kompute # Not including hlsl support # glslang::HLSL # Adding explicit dependencies to match above From 25fc03cb726ae96ffd4300a93630125c67176943 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 14 Mar 2021 11:10:04 +0000 Subject: [PATCH 6/9] Added spdlog, fmt and glslang as public targets --- src/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3488c1bd8..7280dc88d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,7 +57,7 @@ target_include_directories( if(NOT KOMPUTE_OPT_ANDOID_BUILD) target_link_libraries( - kompute + kompute PRIVATE Vulkan::Vulkan ) else() @@ -87,7 +87,7 @@ else() endif() target_link_libraries( - kompute + kompute PUBLIC fmt::fmt ) @@ -103,7 +103,7 @@ if(KOMPUTE_OPT_ENABLE_SPDLOG) endif() target_link_libraries( - kompute + kompute PUBLIC spdlog::spdlog ) endif() @@ -114,7 +114,7 @@ endif() if(KOMPUTE_OPT_ANDOID_BUILD) target_link_libraries( - kompute + kompute PRIVATE kompute_vk_ndk_wrapper log android @@ -152,7 +152,8 @@ if(NOT KOMPUTE_OPT_DISABLE_SHADER_UTILS) kompute PRIVATE ${PROJECT_SOURCE_DIR}/external/glslang) - target_link_libraries(kompute + target_link_libraries( + kompute PUBLIC # Not including hlsl support # HLSL # glslang includes OGLCompiler, OSDependent, MachineIndependent @@ -165,7 +166,8 @@ if(NOT KOMPUTE_OPT_DISABLE_SHADER_UTILS) kompute PRIVATE ${GLSLANG_GENERATED_INCLUDEDIR}) - target_link_libraries(kompute + target_link_libraries( + kompute PUBLIC # Not including hlsl support # glslang::HLSL # Adding explicit dependencies to match above From d60e9ee86b2d6207fa305c7ba3ebc4064cdf27f0 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 14 Mar 2021 14:45:22 +0000 Subject: [PATCH 7/9] Updated to private library include --- src/CMakeLists.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7280dc88d..3488c1bd8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,7 +57,7 @@ target_include_directories( if(NOT KOMPUTE_OPT_ANDOID_BUILD) target_link_libraries( - kompute PRIVATE + kompute Vulkan::Vulkan ) else() @@ -87,7 +87,7 @@ else() endif() target_link_libraries( - kompute PUBLIC + kompute fmt::fmt ) @@ -103,7 +103,7 @@ if(KOMPUTE_OPT_ENABLE_SPDLOG) endif() target_link_libraries( - kompute PUBLIC + kompute spdlog::spdlog ) endif() @@ -114,7 +114,7 @@ endif() if(KOMPUTE_OPT_ANDOID_BUILD) target_link_libraries( - kompute PRIVATE + kompute kompute_vk_ndk_wrapper log android @@ -152,8 +152,7 @@ if(NOT KOMPUTE_OPT_DISABLE_SHADER_UTILS) kompute PRIVATE ${PROJECT_SOURCE_DIR}/external/glslang) - target_link_libraries( - kompute PUBLIC + target_link_libraries(kompute # Not including hlsl support # HLSL # glslang includes OGLCompiler, OSDependent, MachineIndependent @@ -166,8 +165,7 @@ if(NOT KOMPUTE_OPT_DISABLE_SHADER_UTILS) kompute PRIVATE ${GLSLANG_GENERATED_INCLUDEDIR}) - target_link_libraries( - kompute PUBLIC + target_link_libraries(kompute # Not including hlsl support # glslang::HLSL # Adding explicit dependencies to match above From ab7cf079a99ee4cbcf6c7f26f255ce7a6131a77b Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 14 Mar 2021 15:05:52 +0000 Subject: [PATCH 8/9] Updated include directories to always include both the full headers and the single include --- src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3488c1bd8..d67af1c01 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -51,8 +51,8 @@ endif() target_include_directories( kompute PUBLIC - $ - $ + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${PROJECT_SOURCE_DIR}/single_include ) if(NOT KOMPUTE_OPT_ANDOID_BUILD) From 21f4337d551506e9debddc63a53311af5ba3689a Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 14 Mar 2021 15:35:32 +0000 Subject: [PATCH 9/9] Fixed skip test check --- python/test/test_tensor_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/test/test_tensor_types.py b/python/test/test_tensor_types.py index b1d90fe03..91866f885 100644 --- a/python/test/test_tensor_types.py +++ b/python/test/test_tensor_types.py @@ -82,7 +82,7 @@ def test_type_float_double_incorrect(): assert np.all(tensor_out.data() != arr_in_a * arr_in_b) -@pytest.mark.skipif("swiftshader" in os.environ.get("VK_ICD_FILENAMES"), +@pytest.mark.skipif("swiftshader" in os.environ.get("VK_ICD_FILENAMES", ""), reason="Swiftshader doesn't support double") def test_type_double():