Skip to content

Commit

Permalink
Add AMD target
Browse files Browse the repository at this point in the history
Summary:
Currently most of the internal models don't run on AMD because their dependencies are not hipified yet.

Therefore, we manually copied three model code from upstream:

- ctr_mbl_feed_30x OverArch
- inline_cvr_7x OverArch
- dhen_5x OverArch

They won't sync with the upstream, but they also don't depend on any upstream code and runs on AMD GPU.

In addition to these 3 internal models, we have verfied that 10 OSS models also run on AMD GPU:
- densenet121
- hf_Bert
- hf_T5_large
- hf_clip
- llama_v2_7b_16h
- mnasnet1_0
- nanogpt
- resnet50
- timm_nfnet
- timm_vision_transformer

The performance comparison between H100 and MI300X are available at https://docs.google.com/spreadsheets/d/10osGq-AxJ9fMy5nE_GVh8rhxqNcDcLBevs1FQYl2MwQ/edit#gid=0

Reviewed By: nmacchioni

Differential Revision: D54344351

fbshipit-source-id: 5e2bf3700791a9401e604f8ede4b62d10f13d217
  • Loading branch information
xuzhao9 authored and facebook-github-bot committed Feb 29, 2024
1 parent 7f76813 commit 55f8e5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions torchbenchmark/util/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ def _get_batch_size_from_metadata(self) -> Optional[str]:
if self.device != "cuda":
current_device_name = str(self.device)
else:
current_device_name = torch.cuda.get_device_name()
assert current_device_name, f"torch.cuda.get_device_name() returns None when device is set to cuda, please double check."
current_device_name = torch.cuda.get_device_name() if torch.cuda.get_device_name() else "UNKNOWN"
if current_device_name in SPECIAL_DEVICE_MAPPING:
current_device_name = SPECIAL_DEVICE_MAPPING[current_device_name]

Expand Down

2 comments on commit 55f8e5a

@Bellk17
Copy link

@Bellk17 Bellk17 commented on 55f8e5a Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link to the performance comparison does not seem to be public.

@xuzhao9
Copy link
Contributor Author

@xuzhao9 xuzhao9 commented on 55f8e5a Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize, but currently this result is only available internally in Meta.

Please sign in to comment.