class_docstr: Tuner which uses dynamic programming to solve MDP problem.
  
  Note: currently dynamic programming is used to solve this MDP problem. However,
  this problem is intrinsically non-polynomial. DP can't apply for more complicated
  models, such as networks with many element-wise sum operators. In this case, switch
  to heuristic algorithm such as PBQP tuner.
class_docstr_tok: ["Tuner","which","uses","dynamic","programming","to","solve","MDP","problem",".","Note",":","currently","dynamic","programming","is","used","to","solve","this","MDP","problem",".","However",",","this","problem","is","intrinsically","non-polynomial",".","DP","ca","n't","apply","for","more","complicated","models",",","such","as","networks","with","many","element-wise","sum","operators",".","In","this","case",",","switch","to","heuristic","algorithm","such","as","PBQP","tuner","."]
docstr: Track the number of states.
docstr_tok: ["Track","the","number","of","states","."]
code: def _check_num_states(self, num_states):
      """Track the number of states."""
      self._num_states += num_states
      if self._max_num_states is not None:
          if self._num_states > self._max_num_states:
              raise RuntimeError(
                  "Too many states detected while running dynamic "
                  "programming: got %d states but upper limit is %d."
                  % (self._num_states, self._max_num_states)
              )
  
file_path: tvm/python/tvm/autotvm/graph_tuner/dynamic_programming_tuner.py
imports: import sys
  import numpy
  from ._base import MAX_OUTPUT_NODES
  from .base_graph_tuner import BaseGraphTuner
  from .dynamic_programming_stage import DPStage
  from .utils import has_multiple_inputs, is_boundary_node
label_desc: Use image node_id 2 for calling the DPTuner obj's underlying member method code with example usage: obj._check_num_states(num_states) without return types