Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[djl-bench] Run benchmark on multiple GPUs #1144

Merged
merged 1 commit into from
Aug 5, 2021

Conversation

frankfliu
Copy link
Contributor

Change-Id: Ie27e090699695526df42fefd01db2aba78dc3f73

Description

Brief description of what this PR is about

  • If this change is a backward incompatible change, why must this change be made?
  • Interesting edge cases to note here

@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2021

Codecov Report

Merging #1144 (e776fd7) into master (e0aaa4b) will decrease coverage by 0.01%.
The diff coverage is 71.42%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1144      +/-   ##
============================================
- Coverage     70.12%   70.10%   -0.02%     
  Complexity     5329     5329              
============================================
  Files           513      513              
  Lines         23696    23725      +29     
  Branches       2545     2552       +7     
============================================
+ Hits          16617    16633      +16     
- Misses         5722     5728       +6     
- Partials       1357     1364       +7     
Impacted Files Coverage Δ
...mark/src/main/java/ai/djl/benchmark/Arguments.java 77.36% <64.28%> (-0.73%) ⬇️
.../java/ai/djl/benchmark/MultithreadedBenchmark.java 70.37% <64.28%> (-2.87%) ⬇️
.../main/java/ai/djl/benchmark/AbstractBenchmark.java 90.34% <83.33%> (-0.84%) ⬇️
...mark/src/main/java/ai/djl/benchmark/Benchmark.java 60.52% <100.00%> (+1.06%) ⬆️
api/src/main/java/ai/djl/repository/Artifact.java 86.66% <0.00%> (-3.34%) ⬇️
.../src/main/java/ai/djl/repository/zoo/Criteria.java 85.79% <0.00%> (+1.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0aaa4b...e776fd7. Read the comment docs.

List<PredictorCallable> callables = new ArrayList<>(numOfThreads);
for (int i = 0; i < numOfThreads; ++i) {
callables.add(new PredictorCallable(model, metrics, counter, i, i == 0));
for (Device device : devices) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This means that the number of threads is really the number of threads per GPU. Is this the behavior users would expect? Should we document this somewhere or change some names to make it clearer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

number of threads per GPU is confusing, I change it to total thread and added error checking,
I also changed number of iteration in the same way.

Change-Id: Ie27e090699695526df42fefd01db2aba78dc3f73
@frankfliu frankfliu merged commit bc3ee78 into deepjavalibrary:master Aug 5, 2021
@frankfliu frankfliu deleted the bench branch August 5, 2021 19:02
Lokiiiiii pushed a commit to Lokiiiiii/djl that referenced this pull request Oct 10, 2023
Co-authored-by: KexinFeng <fenkexin@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants