[Bugfix][DiffusionGemma] Read the causal mask as int32 and compile the sample step (#59992)
Signed-off-by: ojeda-e <eojeda@league.com>
This commit is contained in:
@@ -472,7 +472,7 @@ def varlen_with_paged_kv(
|
||||
scale = head_size**-0.5
|
||||
token_num = sum(query_lens)
|
||||
dynamic_causal_tensor = (
|
||||
torch.tensor(dynamic_causal, dtype=torch.bool)
|
||||
torch.tensor(dynamic_causal, dtype=torch.int32)
|
||||
if dynamic_causal is not None
|
||||
else None
|
||||
)
|
||||
|
||||
@@ -227,6 +227,10 @@ def test_single_step_tile_skips_self_conditioning():
|
||||
assert not states.self_conditioning_embeds[0].any()
|
||||
|
||||
|
||||
def test_sample_step_is_compiled():
|
||||
assert hasattr(_compiled_sample_step, "_torchdynamo_orig_callable")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("stance", ["default", "force_eager"])
|
||||
def test_self_conditioning_stores_a_bf16_model_in_the_fp32_buffer(stance):
|
||||
# The model's embeddings are bf16 while the buffer is fp32. Compiled code
|
||||
|
||||
Reference in New Issue
Block a user