Skip to content

Commit 8de554a

Browse files
committed
buckify source_transformation
This PR buckies `source_transformation` and move test files into `test`. Differential Revision: [D65175911](https://our.internmc.facebook.com/intern/diff/D65175911/) ghstack-source-id: 250793839 Pull Request resolved: pytorch/executorch#6565
1 parent 470b632 commit 8de554a

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
2+
3+
oncall("executorch")
4+
5+
python_library(
6+
name = "lib",
7+
srcs = [
8+
"__init__.py",
9+
],
10+
deps = [
11+
":source_transformation",
12+
],
13+
)
14+
15+
python_library(
16+
name = "source_transformation",
17+
srcs = [
18+
"apply_spin_quant_r1_r2.py",
19+
"lora.py",
20+
"pre_quantization.py",
21+
"prune_vocab.py",
22+
"quantized_kv_cache.py",
23+
"quantize.py",
24+
"rms_norm.py",
25+
"rope.py",
26+
"sdpa.py",
27+
"spin_quant.py",
28+
"vulkan_rope.py",
29+
],
30+
deps = [
31+
"//caffe2:torch",
32+
],
33+
)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")
2+
3+
oncall("executorch")
4+
5+
python_unittest(
6+
name = "source_transformation",
7+
srcs = [
8+
"test_quantized_kv_cache.py",
9+
"test_sdpa_with_quantized_kv_cache.py",
10+
],
11+
preload_deps = [
12+
"//executorch/extension/llm/custom_ops:custom_ops_aot_lib",
13+
],
14+
deps = [
15+
"fbsource//third-party/pypi/pytest:pytest",
16+
"//executorch/examples/models/llama/source_transformation:lib",
17+
"//executorch/examples/models/llama:llama_transformer",
18+
],
19+
)

examples/models/llama/source_transformation/test_quantized_kv_cache.py renamed to examples/models/llama/source_transformation/test/test_quantized_kv_cache.py

File renamed without changes.

examples/models/llama/source_transformation/test_sdpa_with_quantized_kv_cache.py renamed to examples/models/llama/source_transformation/test/test_sdpa_with_quantized_kv_cache.py

File renamed without changes.

0 commit comments

Comments
 (0)