Skip to content

Commit 001a000

Browse files
committed
Update base for Update on "[ET-VK][ez] Fix handling of assert ops"
## Changes * Apply `RemoveAssertsTransform` as part of `vulkan_preprocess` * Do not call `RemoveAssertsTransform` before lowering the graph * Register ops related to asserts to the operator registry as ephemeral ops ## Motivation assert ops are not implemented in Vulkan, so previously `RemoveAssertsTransform()` is called on the graph before the lowering process. However, it turns out that the assertion ops are required to properly handle dynamic shapes, because they place constraints on the possible range of symbolic integers. If they are not present, then re-tracing the graph during a recompile (which may occur during a graph transform pass) may fail. Therefore, instead of calling the transform before lowering, call it inside vulkan_preprocess after a point where subsequent passes will not attempt to trace the graph. Differential Revision: [D75686048](https://our.internmc.facebook.com/intern/diff/D75686048/) [ghstack-poisoned]
1 parent afd0e32 commit 001a000

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

backends/vulkan/runtime/graph/ops/DispatchNode.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ void DispatchNode::encode(ComputeGraph* graph) {
7575
}
7676

7777
void DispatchNode::write_push_constant_data() {
78-
if (push_constants_.empty()) {
79-
return;
80-
}
81-
8278
push_constants_offset_ = 0;
8379
for (const auto& push_constant : push_constants_) {
8480
push_constants_offset_ += push_constant.write(

0 commit comments

Comments
 (0)