setting OMP_NUM_THREADS

Open
#477 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
r, tensorflow

Research direction

No file, test, or entry point is named in the issue. Start by tracing how the R TensorFlow package initializes its Python process and environment variables, then document the supported way to make OMP_NUM_THREADS available; done means a newcomer can follow the instructions before starting TensorFlow.

Written by the indexing model from the issue text.

Description

docs

How do I set OMP_NUM_THREADS? I'm using high-core cpu and I'm trying to implement intel's recommendations here: https://github.com/IntelAI/models/blob/master/docs/general/tensorflow/GeneralBestPractices.md

As far as I can tell, I can set inter_op_parallelism_threads via tf$config.threading$set_intra_op_parallelism_threads(32L)

and channels first via k_set_image_data_format('channels_first') but since OMP_NUM_THREADS is an environment variable I'm not sure how to set it such that the python shell inherits it.

Dominant language
R
Stars
1.3k
Forks
316
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rstudio/tensorflow

All issues in rstudio/tensorflow

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.