Coverage for /opt/cloud/slavespace/usr1/096471637100f3de0fcfc01072822a80/dttest/api/python/ge/ge/passes/_native.py: 100%

20 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-08-04 11:36 +0800

1#!/usr/bin/env python3 

2# -*- coding: utf-8 -*- 

3# ----------------------------------------------------------------------------------------------------------- 

4# Copyright (c) 2026 Huawei Technologies Co., Ltd. 

5# This program is free software, you can redistribute it and/or modify it under the terms and conditions of 

6# CANN Open Software License Agreement Version 2.0 (the "License"). 

7# Please refer to the License for details. You may not use this file except in compliance with the License. 

8# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, 

9# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. 

10# See LICENSE in the root of the software repository for the full text of the License. 

11# ----------------------------------------------------------------------------------------------------------- 

12 

13"""Load and re-export the selected Python pass native module.""" 

14 

15from __future__ import annotations 

16 

17__all__ = [ 

18 "MatchResult", 

19 "PassContext", 

20 "Pattern", 

21 "PatternMatcherConfig", 

22 "PatternMatcherConfigBuilder", 

23 "SubgraphInput", 

24 "SubgraphOutput", 

25 "SubgraphBoundary", 

26 "SubgraphRewriter", 

27 "borrow_match_result", 

28 "borrow_node", 

29 "can_fuse", 

30 "clone_pattern_matcher_config", 

31 "report_fuse", 

32 "infer_shape", 

33 "release_graph", 

34] 

35 

36from .runtime import ensure_native_module 

37 

38_native = ensure_native_module() 

39 

40MatchResult = _native.MatchResult 

41PassContext = _native.PassContext 

42Pattern = _native.Pattern 

43PatternMatcherConfig = _native.PatternMatcherConfig 

44PatternMatcherConfigBuilder = _native.PatternMatcherConfigBuilder 

45SubgraphInput = _native.SubgraphInput 

46SubgraphOutput = _native.SubgraphOutput 

47SubgraphBoundary = _native.SubgraphBoundary 

48SubgraphRewriter = _native.SubgraphRewriter 

49borrow_match_result = _native.borrow_match_result 

50borrow_node = _native.borrow_node 

51can_fuse = _native.can_fuse 

52clone_pattern_matcher_config = _native.clone_pattern_matcher_config 

53report_fuse = _native.report_fuse 

54infer_shape = _native.infer_shape 

55release_graph = _native.release_graph