Chained scan unit test - #287
Conversation
…s in scan, memory barrier (might be unnecessary
|
|
||
| struct device_capabilities | ||
| { | ||
| #ifdef TEST_NATIVE |
There was a problem hiding this comment.
small nitpicking: If you do { "TEST_NATIVE", "1" } to enable this, it should be #if not #ifdef
| // Normally we'd beautifully JSON serialize the thing, allow multiple devices & drivers + metadata | ||
| auto bin = cpu->getEntries().begin()->second.bin; | ||
| IFile::success_t success; | ||
| m_spirv_isa_cache_output->write(success, bin->data(), 0ull, bin->size()); |
There was a problem hiding this comment.
I can't seem to get the purpose or benefit of the pipeline cache in this example it looks completely unnecessary.
It gets constantly overwritten
and you could actually create a single pipeline per workgroup conf at runtime and not any sort of pipeline cache.
There was a problem hiding this comment.
slightly faster startup if shader did not change
There was a problem hiding this comment.
ok I did not know how pipeline caches work. I though they are overwritten when passed to each create pipeline.
anyways, feels like 95% of the time required for shaders remains to be shader preprocessing and hlsl->spirv compilation with different defines each run of the test
There was a problem hiding this comment.
we can cache that too
| value = scratch[ix]; | ||
| } | ||
| template<typename AccessType, typename IndexType> | ||
| void set(const uint32_t ix, const AccessType value) | ||
| { | ||
| scratch[ix] = value; |
There was a problem hiding this comment.
btw if you want these to be visible to other invocations under Vulkan memory model, you might want to use SPIR-V OpLoad MakeVisible and OpStore MakeAvailable with NonPrivatePointer semantics I think
| bda::__ptr<T> target = ptr + index; | ||
| value = target.template deref().load(); | ||
| } | ||
| template<typename AccessType, typename IndexType> | ||
| void set(const IndexType index, const AccessType value) | ||
| { | ||
| bda::__ptr<T> target = ptr + index; | ||
| return target.template deref().store(value); |
There was a problem hiding this comment.
I think our bda::__ptr needs a load/store method with make available and visible (+ non private)
Its only atomics where avail and vis + non-privateness is implied
| //passed = validateResults<Arithmetic, arithmetic::multiplies<uint32_t>>(itemsPerWG, workgroupCount, subgroupSize, itemsPerInvoc) && passed; | ||
| //passed = validateResults<Arithmetic, arithmetic::minimum<uint32_t>>(itemsPerWG, workgroupCount, subgroupSize, itemsPerInvoc) && passed; | ||
| //passed = validateResults<Arithmetic, arithmetic::maximum<uint32_t>>(itemsPerWG, workgroupCount, subgroupSize, itemsPerInvoc) && passed; | ||
|
|
There was a problem hiding this comment.
why not check all ops ?
No description provided.