Skip to content

Feature Request: Make beam_search_decoder use multiple CPU threads. #17136

Closed

Description

@haotianteng

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 14.04
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): 1.3.0
  • Python version: 2.7
  • Bazel version (if compiling from source):N.A.
  • GCC/Compiler version (if compiling from source):4.9.4
  • CUDA/cuDNN version: 8.0/6.0
  • GPU model and memory: GTX 1080Ti
  • Exact command to reproduce: N.A.

Describe the problem

Add multiple threads support for tf.nn.ctc_beam_search_decoder, for now the tf.nn.ctc_beam_search_decoder is using CPU and only run on 1 thread(although multiple threads has been provided), make it use several CPU threads to run would be very useful as the decoding process of the beam_search_decoder is now the bottleneck of the inference.

Source code / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
I use the nvidia-smi and htop to observe the CPU and GPU usage when running a test CTC decoding process, only 1 CPU thread is used and 0 GPU-Utilitiy has been observed during decoding.

Activity

  1. changed the title [-]Make beam_search_decoder use multiple CPU threads.[/-] [+]Feature Request: Make beam_search_decoder use multiple CPU threads.[/+] on Feb 20, 2018
  2. asimshankar commented on Feb 23, 2018

    @asimshankar
    Contributor

    I don't believe we have anyone actively working on this, however, contributions are welcome.
    The change would likely involve updating the C++ implementation of the operation in https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/ctc_decoder_ops.cc#L178 to utilize multiple threads.

  3. added
    stat:contribution welcome
    type:feature
    on Feb 23, 2018
  4. tamimaddari82 commented on Mar 17, 2018

    @tamimaddari82
    Contributor

    @asimshankar , I would like to work on this issue.

  5. tamimaddari82 commented on Mar 25, 2018

    @tamimaddari82
    Contributor

    @asimshankar ,Can you please check the PR and give feedback? If everything is okay, I will move to parallelize beam search and a GPU implementation of CTC. Thank you very much.

  6. kindernerd commented on Jan 2, 2020

    @kindernerd

    @asimshankar ,Can you please check the PR and give feedback? If everything is okay, I will move to parallelize beam search and a GPU implementation of CTC. Thank you very much.

    Thx! By the way, is there a parallel CTC beam search decoder?

  7. tilakrayal commented on Sep 25, 2022

    @tilakrayal
    Contributor

    @haotianteng,
    Respective PR's were merged and closed. Could you please take a look and let us know if the issue still persists. Thank you!

  8. added
    stat:awaiting response
    on Sep 25, 2022
  9. self-assigned this
    on Sep 25, 2022
  10. google-ml-butler commented on Oct 2, 2022

    @google-ml-butler

    This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you.

  11. added
    stale
    on Oct 2, 2022
  12. google-ml-butler commented on Oct 9, 2022

    @google-ml-butler

    Closing as stale. Please reopen if you'd like to work on this further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stalestat:awaiting responsestat:contribution welcometype:feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions