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

Add adaptive batch size feature #3378

Merged
merged 16 commits into from
Apr 24, 2024
Merged

Conversation

eunwoosh
Copy link
Contributor

@eunwoosh eunwoosh commented Apr 22, 2024

Summary

This PR adds adaptive batch size feature supporting both GPU and XPU.
As same as OTX 1.X, this feature supports "Safe" mode and "Full" mode.
Safe mode checks current batch size fits to memory size and decrease it if not.
Full mode finds a batch size which uses almost memory size.

image

All integration tests on XPU are passed.

How to test

otx train --task ... --data_root ... --adaptive_bs Safe
otx train --task ... --data_root ... --adaptive_bs Full

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have added e2e tests for validation.
  • I have added the description of my changes into CHANGELOG in my target branch (e.g., CHANGELOG in develop).​
  • I have updated the documentation in my target branch accordingly (e.g., documentation in develop).
  • I have linked related issues.

License

  • I submit my code changes under the same Apache License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

@eunwoosh eunwoosh requested a review from vinnamkim April 23, 2024 05:52
harimkang
harimkang previously approved these changes Apr 24, 2024
Copy link
Contributor

@harimkang harimkang left a comment

Choose a reason for hiding this comment

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

Thanks! i left minor comment

@eunwoosh eunwoosh requested a review from harimkang April 24, 2024 04:48
@eunwoosh eunwoosh merged commit d5506e9 into openvinotoolkit:develop Apr 24, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants