Skip to content

Commit 2445c22

Browse files
Split out MemorySpaceAssignmentTest class for re-use.
PiperOrigin-RevId: 707258018
1 parent d80d15e commit 2445c22

File tree

3 files changed

+477
-397
lines changed

3 files changed

+477
-397
lines changed

xla/service/memory_space_assignment/BUILD

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ xla_cc_test(
8484
":cost_analysis",
8585
":memory_space_assignment",
8686
":memory_space_assignment_proto_cc",
87+
":memory_space_assignment_test_base",
8788
":options",
8889
":prefetch_interval_picker",
8990
":repacking",
@@ -160,6 +161,34 @@ cc_library(
160161
],
161162
)
162163

164+
cc_library(
165+
name = "memory_space_assignment_test_base",
166+
testonly = True,
167+
hdrs = ["memory_space_assignment_test_base.h"],
168+
deps = [
169+
":buffer_interval_comparator",
170+
":cost_analysis",
171+
":memory_space_assignment",
172+
":options",
173+
":prefetch_interval_picker",
174+
"//xla:shape_util",
175+
"//xla/hlo/analysis:hlo_alias_analysis",
176+
"//xla/hlo/ir:hlo",
177+
"//xla/hlo/transforms:instruction_hoister",
178+
"//xla/hlo/utils:hlo_live_range",
179+
"//xla/service:buffer_value",
180+
"//xla/service:hlo_buffer",
181+
"//xla/service:hlo_cost_analysis",
182+
"//xla/service:hlo_value",
183+
"//xla/tests:hlo_test_base",
184+
"//xla/tsl/lib/core:status_test_util",
185+
"@com_google_absl//absl/status:statusor",
186+
"@tsl//tsl/platform:status",
187+
"@tsl//tsl/platform:statusor",
188+
"@tsl//tsl/platform:test",
189+
],
190+
)
191+
163192
cc_library(
164193
name = "utils",
165194
srcs = ["utils.cc"],

0 commit comments

Comments
 (0)