Skip to content

Commit fe1491e

Browse files
committed
[ET-VK][EZ] Include alpha to fix aten.sub.Tensor
Missed this in #2366 Differential Revision: [D54880024](https://our.internmc.facebook.com/intern/diff/D54880024/) ghstack-source-id: 218593311 Pull Request resolved: #2418
1 parent fad8702 commit fe1491e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

backends/vulkan/runtime/graph/ops/glsl/all_shaders.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ binary_op:
1919
shader_variants:
2020
- NAME: binary_add
2121
- NAME: binary_sub
22-
OPERATOR: X - Y
22+
OPERATOR: X - A * Y
2323
- NAME: binary_mul
2424
OPERATOR: X * Y
2525
- NAME: binary_div

backends/vulkan/test/test_vulkan_delegate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ def __init__(self):
124124
self.weight = torch.rand(size=(2, 3), dtype=torch.float32)
125125

126126
def forward(self, x, y):
127-
z = x + y
128-
z = z + x
127+
z = torch.add(x, y, alpha=2)
128+
z = torch.add(x, y, alpha=3.14)
129129
z = z + x
130130
z = z + self.weight
131131
return z
@@ -144,8 +144,8 @@ def __init__(self):
144144
super().__init__()
145145

146146
def forward(self, x, y):
147-
z = x - y
148-
z = z - x
147+
z = torch.sub(x, y, alpha=2)
148+
z = torch.sub(z, x, alpha=3.14)
149149
z = z - x
150150
return z
151151

0 commit comments

Comments
 (0)