kompute: push_constant not working in my case?
I tried both codes from README and the test (TestPushConstant.cpp), but apparently push_constant values all get zero value for some reasons?
Here is the result for TestPushConstant.cpp)
:
[alipmpaint@archlinux test]$ ./test_kompute
Running main() from /home/alipmpaint/Documents/github/vulkan-kompute/external/googletest/googletest/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TestPushConstants
[ RUN ] TestPushConstants.TestTwoConstants
[2021-02-28 23:28:54.779] [info] [Shader.cpp:68] Kompute Shader Information:
WARNING: radv is not a conformant vulkan implementation, testing use only.
[2021-02-28 23:28:54.940] [info] [Manager.cpp:269] Using physical device index 1 found AMD RADV VERDE (ACO)
[2021-02-28 23:28:54.947] [info] [Algorithm.cpp:18] Kompute Algorithm initialising with tensor size: 1 and spirv size: 292
[2021-02-28 23:28:54.947] [info] [Algorithm.cpp:395] Kompute OpAlgoCreate setting dispatch size
[2021-02-28 23:28:54.947] [info] [Algorithm.cpp:409] Kompute OpAlgoCreate set dispatch size X: 1, Y: 1, Z: 1
[2021-02-28 23:28:54.947] [info] [Sequence.cpp:44] Kompute Sequence command now started recording
[2021-02-28 23:28:54.947] [info] [Sequence.cpp:58] Kompute Sequence command recording END
/home/alipmpaint/Documents/github/vulkan-kompute/test/TestPushConstant.cpp:46: Failure
Expected equality of these values:
tensor->data()
Which is: { 0, 0, 0 }
kp::Constants({ 0.4, 0.4, 0.4 })
Which is: { 0.4, 0.4, 0.4 }
[2021-02-28 23:28:54.947] [info] [Sequence.cpp:186] Freeing CommandBuffer
[2021-02-28 23:28:54.947] [info] [Sequence.cpp:202] Destroying CommandPool
[2021-02-28 23:28:54.947] [info] [Sequence.cpp:219] Kompute Sequence clearing operations buffer
[2021-02-28 23:28:54.947] [info] [Manager.cpp:102] Destroying device
[2021-02-28 23:28:54.949] [warning] [Sequence.cpp:180] Kompute Sequence destroy called with null Device pointer
[ FAILED ] TestPushConstants.TestTwoConstants (269 ms)
[----------] 1 test from TestPushConstants (269 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (269 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] TestPushConstants.TestTwoConstants
1 FAILED TEST
(specConsts work fine btw)
I don’t know where the problem exactly is… Since the tests have passed in Github actions and I have clones the same code, I guess it’s local. I have two vulkan drivers, one is AMDVLK and the second one AMD RADV VERDE from mesa. What I just described happens with AMD RADV VERDE . In AMDVLK, I get a segfault(I still haven’t investigated whether it’s the push_constant or not since I’m running out of time) in both codes. So, I guess it has something to do with my Vulkan drivers?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 28 (28 by maintainers)
Commits related to this issue
- Merge pull request #174 from EthicalML/168_push_const Adds push const ranges in pipelinelayout to fix #168 — committed to KomputeProject/kompute by axsaucedo 3 years ago
@aliPMPAINT thank you for the update, I have just added #174 - could you test out that PR to see if that fixes your issue? Basically running the tests in
TestPushConstants.*