[XLA] Pass correct HloModuleConfig in overload of RunAndCompare.
Previously, this overload of RunAndCompare would use an empty HloModuleConfig. This isn't correct; it causes us to ignore any XLA_FLAGS, and it leaves constant folding enabled, which we usually want disabled in tests. PiperOrigin-RevId: 248342009
This commit is contained in:
parent
d6643e8819
commit
4a94c4047e
@ -143,6 +143,11 @@ std::unique_ptr<VerifiedHloModule> HloTestBase::CreateNewVerifiedModule(
|
||||
backend().compiler()->ShapeSizeBytesFunction());
|
||||
}
|
||||
|
||||
StatusOr<std::unique_ptr<VerifiedHloModule>>
|
||||
HloTestBase::ParseAndReturnVerifiedModule(absl::string_view hlo_text) {
|
||||
return ParseAndReturnVerifiedModule(hlo_text, GetModuleConfigForTest());
|
||||
}
|
||||
|
||||
StatusOr<std::unique_ptr<VerifiedHloModule>>
|
||||
HloTestBase::ParseAndReturnVerifiedModule(absl::string_view hlo_text,
|
||||
const HloModuleConfig& config) {
|
||||
|
@ -114,8 +114,9 @@ class HloTestBase : public ::testing::Test {
|
||||
|
||||
// Parses the given string and returns module as a VerifiedHloModule.
|
||||
StatusOr<std::unique_ptr<VerifiedHloModule>> ParseAndReturnVerifiedModule(
|
||||
absl::string_view hlo_text,
|
||||
const HloModuleConfig& config = HloModuleConfig());
|
||||
absl::string_view hlo_text);
|
||||
StatusOr<std::unique_ptr<VerifiedHloModule>> ParseAndReturnVerifiedModule(
|
||||
absl::string_view hlo_text, const HloModuleConfig& config);
|
||||
|
||||
// Runs the hlo_pass with the provided module and returns the result. This
|
||||
// function also verifies that the module remains unchanged when hlo_pass
|
||||
|
Loading…
Reference in New Issue
Block a user