Skip to content

Commit

Permalink
fix py format
Browse files Browse the repository at this point in the history
  • Loading branch information
jingguo-st committed Sep 4, 2024
1 parent 99b1e76 commit 68fb489
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion deeplink_ext/ascend_speed/_rotary_embedding_npu.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ def forward(ctx, x, cos, sin):
@staticmethod
def backward(ctx, grad_output):
out, cos, sin = ctx.saved_tensors
return torch_npu.npu_rotary_mul_backward(grad_output, out, cos, sin)[0], None, None
return (
torch_npu.npu_rotary_mul_backward(grad_output, out, cos, sin)[0],
None,
None
)
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from deeplink_ext.utils import PlatformType, deeplink_ext_get_platform_type

@pytest.fixture(scope='session', autouse=True)

@pytest.fixture(scope="session", autouse=True)
def import_module():
platform = deeplink_ext_get_platform_type()
if platform == PlatformType.TORCH_NPU:
Expand Down

0 comments on commit 68fb489

Please sign in to comment.