Skip to content

Commit 3508627

Browse files
author
pytorchbot
committed
2024-12-14 nightly release (3fcf0bd)
1 parent 717584c commit 3508627

File tree

24 files changed

+135
-111
lines changed

24 files changed

+135
-111
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.hypothesis
22
buck-out/
3+
buck2-bin/
34
cmake-out*
45
.DS_Store
56
cmake-android-out/

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,17 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM)
257257
set(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
258258
endif()
259259

260+
if(NOT DEFINED FXDIV_SOURCE_DIR)
261+
set(ORIGINAL_CMAKE_POSITION_INDEPENDENT_CODE_FLAG
262+
${CMAKE_POSITION_INDEPENDENT_CODE}
263+
)
264+
set(FXDIV_SOURCE_DIR "backends/xnnpack/third-party/FXdiv")
265+
add_subdirectory("${FXDIV_SOURCE_DIR}")
266+
set(CMAKE_POSITION_INDEPENDENT_CODE
267+
${ORIGINAL_CMAKE_POSITION_INDEPENDENT_CODE_FLAG}
268+
)
269+
endif()
270+
260271
if(EXECUTORCH_BUILD_CPUINFO)
261272
# --- cpuinfo
262273
set(ORIGINAL_CMAKE_POSITION_INDEPENDENT_CODE_FLAG

backends/arm/tosa_quant_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def quantize_value(x, qargs: QuantArgs, dtype=np.int8):
7171

7272

7373
def dequantize_value(qx, qargs: QuantArgs):
74-
return (qx - qargs.zp) * qargs.scale
74+
return (np.int64(qx) - qargs.zp) * qargs.scale
7575

7676

7777
def qargs_from_qnode(node: torch.fx.Node):

backends/vulkan/_passes/tag_memory_meta_pass.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323

2424
from executorch.exir.pass_base import ExportPass, PassResult
2525

26-
from torch._subclasses.fake_tensor import FakeTensor
27-
2826
from torch.fx.passes.tools_common import NodeList
2927
from torch.fx.passes.utils.fuser_utils import topo_sort
3028

@@ -138,9 +136,7 @@ def propose_node_storage(
138136
return storage
139137

140138
for arg in node.args:
141-
if isinstance(arg, torch.fx.Node) and isinstance(
142-
arg.meta["val"], FakeTensor
143-
):
139+
if isinstance(arg, torch.fx.Node) and utils.is_tensor_node(arg):
144140
storage = utils.get_node_storage_type(arg)
145141
if storage is not None and storage in valid_storage_types:
146142
return storage
@@ -178,9 +174,7 @@ def propose_node_layout(
178174
return layout
179175

180176
for arg in node.args:
181-
if isinstance(arg, torch.fx.Node) and isinstance(
182-
arg.meta["val"], FakeTensor
183-
):
177+
if isinstance(arg, torch.fx.Node) and utils.is_tensor_node(arg):
184178
layout = utils.get_node_memory_layout(arg)
185179
if layout is not None and layout in valid_layouts:
186180
return layout
@@ -202,14 +196,19 @@ def should_annotate(self, node) -> bool:
202196
if not isinstance(node, torch.fx.Node):
203197
return False
204198

205-
if not isinstance(node.meta["val"], FakeTensor):
199+
if not utils.is_tensor_node(node):
206200
return False
207201

208202
# Storage type and memory layout for tensorref will be determined at runtime
209203
# so there's no use in setting those attributes ahead of time.
210204
if node.meta.get("vkdg_tensorref", False):
211205
return False
212206

207+
# Skip annotating output node. The output tensors should be annotated by the
208+
# time the output node is observed.
209+
if node.op == "output":
210+
return False
211+
213212
return True
214213

215214
def should_delay_annotation(self, node: torch.fx.Node) -> bool:

backends/vulkan/docs/android_demo.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ First, build and install ExecuTorch libraries, then build the LLaMA runner
8181
binary using the Android NDK toolchain.
8282

8383
```shell
84-
(rm -rf cmake-android-out && \
84+
./install_requirements.sh --clean
85+
(mkdir cmake-android-out && \
8586
cmake . -DCMAKE_INSTALL_PREFIX=cmake-android-out \
8687
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \
8788
-DANDROID_ABI=$ANDROID_ABI \

0 commit comments

Comments
 (0)