Skip to content

Commit

Permalink
Remove xfail from sharded Llama export to MLIR test
Browse files Browse the repository at this point in the history
iree-org/iree-turbine#175
solves the failing export.
  • Loading branch information
sogartar committed Sep 27, 2024
1 parent fca29f4 commit e360bd6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions sharktank/tests/models/llama/sharded_llama_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ def testCompareToySizedModelToUnsharded(self):
actual_decode_cache_state, expected_decode_cache_state, atol=1e-4, rtol=1e-4
)

@unittest.expectedFailure
def testExportToySizedModelToMlir(self):
with tempfile.TemporaryDirectory() as temp_dir:
sharded_config = deepcopy(self.config)
Expand All @@ -204,7 +203,7 @@ def testExportToySizedModelToMlir(self):
sharded_dataset = Dataset({}, sharded_theta)
parameters_path = f"{temp_dir}/parameters.irpa"
sharded_dataset.save(f"{temp_dir}/parameters.irpa")
sharded_dataset = Dataset.load(parameters_path)
sharded_dataset = Dataset.load(parameters_path, mmap=False)

model = PagedLlamaModelV1(self.theta, self.config)
sharded_model = PagedLlamaModelV1(
Expand Down Expand Up @@ -238,9 +237,5 @@ def _(model, *args, **kwargs) -> torch.Tensor:
def _(model, *args, **kwargs) -> torch.Tensor:
return model.decode(*args, **kwargs)

# TODO: debug error
# TypeError: Unsupported torch type conversion for
# !torch.vtensor<[3,1,7],complex<f32>>
# https://github.com/llvm/torch-mlir/pull/3738 may fix this.
output = export(sharded_fxb)
output.save_mlir(f"{temp_dir}/program.mlir")

0 comments on commit e360bd6

Please sign in to comment.