Skip to content

Commit

Permalink
gfx1200-1 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Cemberk committed Feb 5, 2025
1 parent 7c338ef commit 107a8c3
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions tests/generation/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2569,7 +2569,7 @@ def test_transition_scores_greedy_search_normalized(self):
def test_transition_scores_greedy_search(self):
super().test_transition_scores_greedy_search()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_generate_input_features_as_encoder_kwarg(self):
super().test_generate_input_features_as_encoder_kwarg()

Expand Down Expand Up @@ -2608,7 +2608,7 @@ def test_diverse_beam_search(self):
],
)

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_max_length_if_input_embeds(self):
# PT-only test: TF doesn't have StoppingCriteria
article = "Today a dragon flew over Paris."
Expand Down
4 changes: 2 additions & 2 deletions tests/models/aria/test_modeling_aria.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ class AriaForConditionalGenerationModelTest(ModelTesterMixin, GenerationTesterMi
test_head_masking = False
_is_composite = True

@skipIfRocm(arch=['gfx942','gfx90a'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_flex_attention_with_grads(self):
super().test_flex_attention_with_grads()

@skipIfRocm(arch=['gfx942','gfx90a'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_generate_from_inputs_embeds_with_static_cache(self):
super().test_generate_from_inputs_embeds_with_static_cache()

Expand Down
60 changes: 30 additions & 30 deletions tests/models/emu3/test_modeling_emu3.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,123 +319,123 @@ class Emu3Vision2TextModelTest(ModelTesterMixin, GenerationTesterMixin, Pipeline
test_pruning = False
fx_compatible = False

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_generate_methods_with_logits_to_keep(self):
super().test_generate_methods_with_logits_to_keep()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_generate_from_inputs_embeds_with_static_cache(self):
super().test_generate_from_inputs_embeds_with_static_cache()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_generate_with_static_cache(self):
super().test_generate_with_static_cache()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_attention_outputs(self):
super().test_attention_outputs()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_batching_equivalence(self):
super().test_batching_equivalence()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_beam_sample_generate(self):
super().test_beam_sample_generate()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_beam_sample_generate_dict_output(self):
super().test_beam_sample_generate_dict_output()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_beam_search_generate(self):
super().test_beam_search_generate()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_generate_from_inputs_embeds_with_static_cache(self):
super().test_generate_from_inputs_embeds_with_static_cache()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_beam_search_generate_dict_output(self):
super().test_beam_search_generate_dict_output()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_beam_search_low_memory(self):
super().test_beam_search_low_memory()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_constrained_beam_search_generate(self):
super().test_constrained_beam_search_generate()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_constrained_beam_search_generate_dict_output(self):
super().test_constrained_beam_search_generate_dict_output()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_determinism(self):
super().test_determinism()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_group_beam_search_generate(self):
super().test_group_beam_search_generate()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_group_beam_search_generate_dict_output(self):
super().test_group_beam_search_generate_dict_output()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_hidden_states_output(self):
super().test_hidden_states_output()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_model_outputs_equivalence(self):
super().test_model_outputs_equivalence()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_offloaded_cache_implementation_0_offloaded(self):
super().test_offloaded_cache_implementation_0_offloaded()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_resize_tokens_embeddings(self):
super().test_resize_tokens_embeddings()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_retain_grad_hidden_states_attentions(self):
super().test_retain_grad_hidden_states_attentions()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_feed_forward_chunking(self):
super().test_feed_forward_chunking()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_flex_attention_with_grads(self):
super().test_flex_attention_with_grads()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_forward_with_logits_to_keep(self):
super().test_forward_with_logits_to_keep()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_greedy_generate(self):
super().test_greedy_generate()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_greedy_generate_dict_outputs(self):
super().test_greedy_generate_dict_outputs()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_group_beam_search_generate(self):
super().test_group_beam_search_generate()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_sample_generate(self):
super().test_sample_generate()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_sample_generate_dict_output(self):
super().test_sample_generate_dict_output()

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_save_load(self):
super().test_save_load()

Expand Down
2 changes: 1 addition & 1 deletion tests/models/gpt_neox/test_modeling_gpt_neox.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class GPTNeoXModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMi
test_model_parallel = False
test_head_masking = False

@skipIfRocm(arch=['gfx90a','gfx942'])
@skipIfRocm(arch=['gfx90a','gfx942','gfx1100','gfx1200','gfx1201'])
def test_flex_attention_with_grads(self):
super().test_flex_attention_with_grads()

Expand Down
4 changes: 2 additions & 2 deletions tests/models/mixtral/test_modeling_mixtral.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@ class MixtralModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMi
fx_compatible = False # Broken by attention refactor cc @Cyrilvallez

def test_generate_from_inputs_embeds_with_static_cache(self):
if rocmUtils.is_rocm_skippable(arch=['gfx90a','gfx942']):
if rocmUtils.is_rocm_skippable(arch=['gfx90a','gfx942','gfx1201','gfx1200']):
torch._dynamo.config.capture_dynamic_output_shape_ops = True
super().test_generate_from_inputs_embeds_with_static_cache()

def test_generate_with_static_cache(self):
if rocmUtils.is_rocm_skippable(arch=['gfx90a','gfx942']):
if rocmUtils.is_rocm_skippable(arch=['gfx90a','gfx942','gfx1201','gfx1200']):
torch._dynamo.config.capture_dynamic_output_shape_ops = True
super().test_generate_with_static_cache()

Expand Down
2 changes: 1 addition & 1 deletion tests/models/moshi/test_modeling_moshi.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def test_new_cache_format(self):
super().test_new_cache_format_0()
pass

@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_offloaded_cache_implementation_0_offloaded(self):
super().test_offloaded_cache_implementation_0_offloaded()
pass
Expand Down
2 changes: 1 addition & 1 deletion tests/models/phimoe/test_modeling_phimoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class PhimoeModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMix
test_headmasking = False
test_pruning = False

@skipIfRocm(arch=['gfx90a','gfx942'])
@skipIfRocm(arch=['gfx90a','gfx942','gfx1100','gfx1201','gfx1200'])
def test_generate_with_static_cache(self):
super().test_generate_with_static_cache()

Expand Down
2 changes: 1 addition & 1 deletion tests/pipelines/test_pipelines_audio_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def test_small_model_pt(self):
self.assertIn(nested_simplify(output, decimals=4), [EXPECTED_OUTPUT, EXPECTED_OUTPUT_PT_2])

@require_torch
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_small_model_pt_fp16(self):
model = "anton-l/wav2vec2-random-tiny-classifier"

Expand Down
2 changes: 1 addition & 1 deletion tests/pipelines/test_pipelines_depth_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def test_small_model_pt(self):
self.skipTest(reason="There is not hf-internal-testing tiny model for either GLPN nor DPT")

@require_torch
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100'])
@skipIfRocm(arch=['gfx942','gfx90a','gfx1100','gfx1201','gfx1200'])
def test_multiprocess(self):
depth_estimator = pipeline(
model="hf-internal-testing/tiny-random-DepthAnythingForDepthEstimation",
Expand Down

0 comments on commit 107a8c3

Please sign in to comment.