Skip to content

Add an option to limit the CPU usage #2

Description

@djshen

We can add a command line option to adjust the CPU usage, so that the program won't use up all of the resources. In addition, one can compare the timing of different settings.

parser.add_argument('--num_threads', dest='num_threads', type=int, default=0)

sess_config.inter_op_parallelism_threads = args.num_threads
sess_config.intra_op_parallelism_threads = args.num_threads

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions