Merge pull request #66 from Dudecake/master
Fix compiler errors on compilers other than msvc
This commit is contained in:
commit
5460681ad9
6 changed files with 14 additions and 20 deletions
|
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.17.0)
|
||||
project(kompute_godot VERSION 0.1.0)
|
||||
project(kompute_array_mult VERSION 0.1.0)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
|
|
@ -13,15 +13,10 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DRELEASE=1 ${KOMPUTE_EX
|
|||
find_package(kompute REQUIRED)
|
||||
find_package(Vulkan REQUIRED)
|
||||
|
||||
add_executable(kompute_godot
|
||||
add_executable(kompute_array_mult
|
||||
src/Main.cpp)
|
||||
|
||||
target_link_libraries(kompute_godot
|
||||
target_link_libraries(kompute_array_mult
|
||||
kompute::kompute
|
||||
Vulkan::Vulkan
|
||||
)
|
||||
|
||||
target_link_libraries(kompute_godot
|
||||
"lib/godot.windows.tools.64.lib"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -792,7 +792,7 @@ class Manager
|
|||
*/
|
||||
template<typename T, typename... TArgs>
|
||||
void evalOp(std::vector<std::shared_ptr<Tensor>> tensors,
|
||||
std::string sequenceName = KP_DEFAULT_SESSION,
|
||||
std::string sequenceName,
|
||||
TArgs&&... params)
|
||||
{
|
||||
SPDLOG_DEBUG("Kompute Manager evalOp triggered");
|
||||
|
|
@ -1195,7 +1195,7 @@ OpAlgoBase<tX, tY, tZ>::init()
|
|||
|
||||
SPDLOG_DEBUG("Kompute OpAlgoBase fetching spirv data");
|
||||
|
||||
std::vector<char>& shaderFileData = this->fetchSpirvBinaryData();
|
||||
std::vector<char> shaderFileData = this->fetchSpirvBinaryData();
|
||||
|
||||
SPDLOG_DEBUG("Kompute OpAlgoBase Initialising algorithm component");
|
||||
|
||||
|
|
@ -1427,7 +1427,7 @@ OpAlgoLhsRhsOut<tX, tY, tZ>::init()
|
|||
|
||||
SPDLOG_DEBUG("Kompute OpAlgoLhsRhsOut fetching spirv data");
|
||||
|
||||
std::vector<char>& shaderFileData = this->fetchSpirvBinaryData();
|
||||
std::vector<char> shaderFileData = this->fetchSpirvBinaryData();
|
||||
|
||||
SPDLOG_DEBUG("Kompute OpAlgoLhsRhsOut Initialising algorithm component");
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class Manager
|
|||
*/
|
||||
template<typename T, typename... TArgs>
|
||||
void evalOp(std::vector<std::shared_ptr<Tensor>> tensors,
|
||||
std::string sequenceName = KP_DEFAULT_SESSION,
|
||||
std::string sequenceName,
|
||||
TArgs&&... params)
|
||||
{
|
||||
SPDLOG_DEBUG("Kompute Manager evalOp triggered");
|
||||
|
|
@ -101,7 +101,6 @@ class Manager
|
|||
* sequences.
|
||||
*
|
||||
* @param tensors The tensors to be used in the operation recorded
|
||||
* @param sequenceName The name of the sequence to be retrieved or created
|
||||
* @param TArgs Template parameters that will be used to initialise
|
||||
* Operation to allow for extensible configurations on initialisation
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ OpAlgoBase<tX, tY, tZ>::init()
|
|||
|
||||
SPDLOG_DEBUG("Kompute OpAlgoBase fetching spirv data");
|
||||
|
||||
std::vector<char>& shaderFileData = this->fetchSpirvBinaryData();
|
||||
std::vector<char> shaderFileData = this->fetchSpirvBinaryData();
|
||||
|
||||
SPDLOG_DEBUG("Kompute OpAlgoBase Initialising algorithm component");
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ OpAlgoLhsRhsOut<tX, tY, tZ>::init()
|
|||
|
||||
SPDLOG_DEBUG("Kompute OpAlgoLhsRhsOut fetching spirv data");
|
||||
|
||||
std::vector<char>& shaderFileData = this->fetchSpirvBinaryData();
|
||||
std::vector<char> shaderFileData = this->fetchSpirvBinaryData();
|
||||
|
||||
SPDLOG_DEBUG("Kompute OpAlgoLhsRhsOut Initialising algorithm component");
|
||||
|
||||
|
|
|
|||
|
|
@ -8,18 +8,18 @@ TEST(TestManager, EndToEndOpMultFlow)
|
|||
kp::Manager mgr;
|
||||
|
||||
std::shared_ptr<kp::Tensor> tensorLHS{ new kp::Tensor({ 0, 1, 2 }) };
|
||||
mgr.evalOp<kp::OpTensorCreate>({ tensorLHS });
|
||||
mgr.evalOpDefault<kp::OpTensorCreate>({ tensorLHS });
|
||||
|
||||
std::shared_ptr<kp::Tensor> tensorRHS{ new kp::Tensor({ 2, 4, 6 }) };
|
||||
mgr.evalOp<kp::OpTensorCreate>({ tensorRHS });
|
||||
mgr.evalOpDefault<kp::OpTensorCreate>({ tensorRHS });
|
||||
|
||||
std::shared_ptr<kp::Tensor> tensorOutput{ new kp::Tensor({ 0, 0, 0 }) };
|
||||
|
||||
mgr.evalOp<kp::OpTensorCreate>({ tensorOutput });
|
||||
mgr.evalOpDefault<kp::OpTensorCreate>({ tensorOutput });
|
||||
|
||||
mgr.evalOp<kp::OpMult<>>({ tensorLHS, tensorRHS, tensorOutput });
|
||||
mgr.evalOpDefault<kp::OpMult<>>({ tensorLHS, tensorRHS, tensorOutput });
|
||||
|
||||
mgr.evalOp<kp::OpTensorSyncLocal>({ tensorOutput });
|
||||
mgr.evalOpDefault<kp::OpTensorSyncLocal>({ tensorOutput });
|
||||
|
||||
EXPECT_EQ(tensorOutput->data(), std::vector<float>({ 0, 4, 12 }));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue