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

Implement python bindings for profiler #1739

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yehudaorel
Copy link

Overview

Related to: #1736 ,will also resolve: #1734

Expose profiler functionality - ctranslate2::init_profiling() & ctranslate2::dump_profiling() to python level.

Example usage:

import ctranslate2

# Initialize the profiler on CPU
ctranslate2.init_profiler(device = ctranslate2.Device.cpu, 1)

Load model, generate/translate...

# Dump profiling to stdout
ctranslate2.dump_profiler()

@minhthuc2502
Copy link
Collaborator

Could you add the ENABLE_PROFILING in CTranslate2/python/tools/prepare_build_environment_linux.sh, windows and macos please?

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.

[Profiling] Help needed with Profiling CT2 on both CUDA and CPU
2 participants