Skip to content

Commit

Permalink
lint and license fix
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Gadzinski <[email protected]>
  • Loading branch information
pggPL committed Feb 6, 2025
1 parent 673c23c commit 64455c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions transformer_engine/debug/features/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TEConfigAPIMapper(BaseConfigAPIMapper):
"""Class responsible for determining which API should be run for each tensors and gemms."""

def parse_config_and_api(self, config, **kwargs):
# Process the config and returns True if the config and api args match, along with processed config.
""" Process the config and returns True if the config and api args match, along with processed config. """
processed_config = None
config_copy = copy.deepcopy(config)
gemm_parsing = kwargs.get("gemm_parsing", False)
Expand Down Expand Up @@ -200,7 +200,7 @@ def input_assertions_hook(self, api_name, **kwargs):
f" {api_name}."
)

def routing_condition(self, api_name, config, layer_name, feature_obj, **kwargs):
def routing_condition(self, api_name, config, _, feature_obj, **kwargs):
"""
Overridden APIs are selected based on the GEMM name in the config and kwargs.
"""
Expand All @@ -212,6 +212,7 @@ def routing_condition(self, api_name, config, layer_name, feature_obj, **kwargs)
return status, modified_config

def output_assertions_hook(self, api_name, ret, **kwargs):
""" Output hooks using to check correctness of the outputs of the API calls. """
if "enabled" in api_name or api_name == "fp8_gemm":
assert isinstance(ret, bool)
if api_name in ["inspect_tensor", "inspect_tensor_postquantize"]:
Expand Down
3 changes: 3 additions & 0 deletions transformer_engine/debug/pytorch/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See LICENSE for license information.

0 comments on commit 64455c9

Please sign in to comment.