-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c542546
commit 45de1f9
Showing
3 changed files
with
29 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from optimum_benchmark.logging_utils import setup_logging | ||
from optimum_benchmark.experiment import launch, ExperimentConfig | ||
from optimum_benchmark.backends.pytorch.config import PyTorchConfig | ||
from optimum_benchmark.launchers.torchrun.config import TorchrunConfig | ||
from optimum_benchmark.benchmarks.inference.config import InferenceConfig | ||
|
||
if __name__ == "__main__": | ||
setup_logging(level="INFO") | ||
launcher_config = TorchrunConfig(nproc_per_node=2) | ||
benchmark_config = InferenceConfig(latency=True, memory=True) | ||
backend_config = PyTorchConfig(model="gpt2", device="cuda", device_ids="0,1", no_weights=True) | ||
experiment_config = ExperimentConfig( | ||
experiment_name="api-launch", | ||
benchmark=benchmark_config, | ||
launcher=launcher_config, | ||
backend=backend_config, | ||
) | ||
benchmark_report = launch(experiment_config) | ||
experiment_config.push_to_hub("IlyasMoutawwakil/benchmarks") | ||
benchmark_report.push_to_hub("IlyasMoutawwakil/benchmarks") |
This file contains 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