Open
Conversation
…r the wavernn models
…l code is inside the audio folder, added backward pass code for some of the models
…ut code for the audio benchmarking code
…for undefined network names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Create microbenchmarking code for apex and torchaudio.
It should load example models and calculate time per batch and throughput for these models.
Technical Details
The below diagram explains the main steps in the microbenchmark code:
The microbenchark
time per batch- the average time for forward and/or backward passes for batchsize input done iteration times andthroughput(batches processed per second).deepspeed.profiling.flops_profiler.FlopsProfilerApex microbenchmarking
Based on this example https://github.com/ROCm/apex/tree/master/examples/imagenet, changing the micro_benchmarking_pytorch to apex:
https://github.com/ROCm/pytorch-micro-benchmarking/blob/apex_micro_benchmarking/micro_benchmarking_apex.py
Add the following arguments:
Use the same torchvision models used in pytorch microbenchmarking
Torchaudio
For torchaudio, first we understand the different models available, their inputs, outputs and loss. These inputs, outputs, losses need to be defined for each model type.
Taking models from https://docs.pytorch.org/audio/stable/models.html, classifying into different audio tasks that use different inputs and outputs
Test Plan
docker - registry-sc-harbor.amd.com/framework/compute-rocm-dkms-no-npi-hipclang:16972_ubuntu24.04_py3.12_pytorch_release-2.9_7e1940d4
Running the different models for apex and torchaudio microbenchmarks.
python3 micro_benchmarking_apex.py --network resnet50python3 micro_benchmarking_audio.py --network wav2vec2_baseTest Result
Apex microbenchmark output
Torchaudio microbenchmark output
Submission Checklist