Dataclass which contains profiler config for the engine.
Summary
Functions
Get field from env var if set, with deprecation warning.
Set field from env var if set, with deprecation warning.
Python method ProfilerConfig._validate_profiler_config.
WARNING: Whenever a new field is added to this config,
Constructs ProfilerConfig.
Types
Functions
@spec _get_from_env_if_set(SnakeBridge.Ref.t(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:error, Snakepit.Error.t()}
Get field from env var if set, with deprecation warning.
Parameters
field_name(String.t())env_var_name(String.t())
Returns
nil
@spec _set_from_env_if_set( SnakeBridge.Ref.t(), String.t(), String.t(), [term()], keyword() ) :: {:ok, nil} | {:error, Snakepit.Error.t()}
Set field from env var if set, with deprecation warning.
Parameters
field_name(String.t())env_var_name(String.t())to_bool(boolean() default: True)to_int(boolean() default: False)
Returns
nil
@spec _validate_profiler_config( SnakeBridge.Ref.t(), keyword() ) :: {:ok, term()} | {:error, Snakepit.Error.t()}
Python method ProfilerConfig._validate_profiler_config.
Returns
term()
@spec compute_hash( SnakeBridge.Ref.t(), keyword() ) :: {:ok, String.t()} | {:error, Snakepit.Error.t()}
WARNING: Whenever a new field is added to this config,
ensure that it is included in the factors list if it affects the computation graph.
Provide a hash that uniquely identifies all the configs that affect the structure of the computation graph from input ids/embeddings to the final hidden states, excluding anything before input ids/embeddings and after the final hidden states.
Returns
String.t()
@spec delay_iterations(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec ignore_frontend(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec max_iterations(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec new(term(), term(), term(), keyword()) :: {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()}
Constructs ProfilerConfig.
Parameters
dataclass_self__(term())args(term())kwargs(term())
@spec profiler(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec torch_profiler_dir(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec torch_profiler_dump_cuda_time_total(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec torch_profiler_record_shapes(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec torch_profiler_use_gzip(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec torch_profiler_with_flops(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec torch_profiler_with_memory(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec torch_profiler_with_stack(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}