已合并
[v2.9.0][bugfix]cann and pta header mixing bulid bugfix #44992
Dring创建于 17 天前
[v2.9.0][bugfix]cann and pta header mixing bulid bugfix #44992
已合并
Dring创建于 17 天前
81 个文件变更+223-150
@@ -281,8 +281,6 @@ def copy_hpp():
281 "torch_npu/csrc/inductor/**/*.h",281 "torch_npu/csrc/inductor/**/*.h",
282 "torch_npu/csrc/distributed/*.h",282 "torch_npu/csrc/distributed/*.h",
283 "torch_npu/csrc/distributed/*.hpp",283 "torch_npu/csrc/distributed/*.hpp",
284- "third_party/acl/inc/*/*.h",
285- "third_party/acl/inc/*/*/*.h",
286 "third_party/hccl/inc/*/*.h",284 "third_party/hccl/inc/*/*.h",
287 ]285 ]
288 glob_header_files = []286 glob_header_files = []
@@ -299,6 +297,38 @@ def copy_hpp():
299 os.makedirs(os.path.dirname(dst), exist_ok=True)297 os.makedirs(os.path.dirname(dst), exist_ok=True)
300 ret.append((src, dst))298 ret.append((src, dst))
301 299 
300+ acl_include_root = os.path.join(BASE_DIR, "third_party", "acl", "inc")
301+ acl_header_files = glob.glob(
302+ os.path.join(acl_include_root, "**", "*.h"),
303+ recursive=True,
304+ )
305+ for src in acl_header_files:
306+ relative_header = os.path.relpath(src, acl_include_root)
307+ dst = os.path.join(
308+ BASE_DIR,
309+ "libtorch_npu/include",
310+ relative_header,
311+ )
312+ os.makedirs(os.path.dirname(dst), exist_ok=True)
313+ ret.append((src, dst))
314+ 
315+ # Preserve legacy include paths with forwarding headers, not duplicate ACL headers.
316+ wrapper_src = os.path.join(
317+ BASE_DIR, "build", "acl_compat_headers", relative_header
318+ )
319+ os.makedirs(os.path.dirname(wrapper_src), exist_ok=True)
320+ with open(wrapper_src, "w", encoding="utf-8", newline="\n") as wrapper_file:
321+ wrapper_file.write("#pragma once\n#include <{}>\n".format(
322+ relative_header.replace(os.sep, "/")
323+ ))
324+ wrapper_dst = os.path.join(
325+ BASE_DIR,
326+ "libtorch_npu/include/third_party/acl/inc",
327+ relative_header,
328+ )
329+ os.makedirs(os.path.dirname(wrapper_dst), exist_ok=True)
330+ ret.append((wrapper_src, wrapper_dst))
331+ 
302 return ret332 return ret
303 333 
304 ret = get_src_py_and_dst()334 ret = get_src_py_and_dst()
@@ -55,8 +55,7 @@ def fetch_acl_headers():
55 # 2. Fallback: copy from installed torch_npu55 # 2. Fallback: copy from installed torch_npu
56 try:56 try:
57 import torch_npu57 import torch_npu
58- installed_acl = Path(58+ installed_acl = Path(torch_npu.__file__).resolve().parent / 'include' / 'acl'
59- torch_npu.__file__).resolve().parent / 'include' / 'third_party' / 'acl' / 'inc' / 'acl'
60 if installed_acl.is_dir():59 if installed_acl.is_dir():
61 acl_dest.mkdir(parents=True, exist_ok=True)60 acl_dest.mkdir(parents=True, exist_ok=True)
62 shutil.copytree(str(installed_acl), str(acl_dest), dirs_exist_ok=True)61 shutil.copytree(str(installed_acl), str(acl_dest), dirs_exist_ok=True)
Msetup.py+32-2
@@ -473,9 +473,7 @@ def get_src_py_and_dst():
473 "torch_npu/csrc/*/*/*.h",473 "torch_npu/csrc/*/*/*.h",
474 "torch_npu/csrc/*/*/*/*.h",474 "torch_npu/csrc/*/*/*/*.h",
475 "torch_npu/csrc/*/*/*/*/*.h",475 "torch_npu/csrc/*/*/*/*/*.h",
476- "third_party/acl/inc/*/*.h",
477 "third_party/hccl/inc/*/*.h",476 "third_party/hccl/inc/*/*.h",
478- "third_party/acl/inc/*/*/*.h",
479 "torch_npu/csrc/distributed/HCCLUtils.hpp",477 "torch_npu/csrc/distributed/HCCLUtils.hpp",
480 "torch_npu/csrc/distributed/ProcessGroupHCCL.hpp"478 "torch_npu/csrc/distributed/ProcessGroupHCCL.hpp"
481 ]479 ]
@@ -491,6 +489,38 @@ def get_src_py_and_dst():
491 os.makedirs(os.path.dirname(dst), exist_ok=True)489 os.makedirs(os.path.dirname(dst), exist_ok=True)
492 ret.append((src, dst))490 ret.append((src, dst))
493 491 
492+ acl_include_root = os.path.join(BASE_DIR, "third_party", "acl", "inc")
493+ acl_header_files = glob.glob(
494+ os.path.join(acl_include_root, "**", "*.h"),
495+ recursive=True,
496+ )
497+ for src in acl_header_files:
498+ relative_header = os.path.relpath(src, acl_include_root)
499+ dst = os.path.join(
500+ BASE_DIR,
501+ "build/packages/torch_npu/include",
502+ relative_header,
503+ )
504+ os.makedirs(os.path.dirname(dst), exist_ok=True)
505+ ret.append((src, dst))
506+ 
507+ # Preserve legacy include paths with forwarding headers, not duplicate ACL headers.
508+ wrapper_src = os.path.join(
509+ BASE_DIR, "build", "acl_compat_headers", relative_header
510+ )
511+ os.makedirs(os.path.dirname(wrapper_src), exist_ok=True)
512+ with open(wrapper_src, "w", encoding="utf-8", newline="\n") as wrapper_file:
513+ wrapper_file.write("#pragma once\n#include <{}>\n".format(
514+ relative_header.replace(os.sep, "/")
515+ ))
516+ wrapper_dst = os.path.join(
517+ BASE_DIR,
518+ "build/packages/torch_npu/include/third_party/acl/inc",
519+ relative_header,
520+ )
521+ os.makedirs(os.path.dirname(wrapper_dst), exist_ok=True)
522+ ret.append((wrapper_src, wrapper_dst))
523+ 
494 torch_header_files = [524 torch_header_files = [
495 "*/*.h",525 "*/*.h",
496 "*/*/*.h",526 "*/*/*.h",
@@ -21,7 +21,12 @@ def create_build_path(build_directory):
21 21 
22 22 
23def build_stub(base_dir):23def build_stub(base_dir):
24- build_stub_cmd = ["sh", os.path.join(base_dir, 'third_party/acl/libs/build_stub.sh')]24+ build_stub_cmd = [
25+ "sh",
26+ os.path.join(base_dir, 'third_party/acl/libs/build_stub.sh'),
27+ # Use the installed header root for both the ACL stub and C++ Extension.
28+ os.path.join(PYTORCH_NPU_INSTALL_PATH, "include"),
29+ ]
25 if subprocess.call(build_stub_cmd) != 0:30 if subprocess.call(build_stub_cmd) != 0:
26 raise RuntimeError('Failed to build stub: {}'.format(build_stub_cmd))31 raise RuntimeError('Failed to build stub: {}'.format(build_stub_cmd))
27 32 
@@ -47,7 +52,6 @@ class TestPluggableAllocator(TestCase):
47 extra_ldflags.append(f"-L{PYTORCH_INSTALL_PATH}")52 extra_ldflags.append(f"-L{PYTORCH_INSTALL_PATH}")
48 extra_include_paths = [os.path.join(TEST_DIR, "cpp_extensions")]53 extra_include_paths = [os.path.join(TEST_DIR, "cpp_extensions")]
49 extra_include_paths.append(os.path.join(PYTORCH_NPU_INSTALL_PATH, 'include'))54 extra_include_paths.append(os.path.join(PYTORCH_NPU_INSTALL_PATH, 'include'))
50- extra_include_paths.append(os.path.join(PYTORCH_NPU_INSTALL_PATH, 'include', 'third_party', 'acl', 'inc'))
51 55 
52 cls.module = torch.utils.cpp_extension.load(56 cls.module = torch.utils.cpp_extension.load(
53 name="pluggable_allocator_extensions",57 name="pluggable_allocator_extensions",
@@ -2,8 +2,8 @@
2#include <iostream>2#include <iostream>
3#include <torch/extension.h>3#include <torch/extension.h>
4 4 
5-#include "third_party/acl/inc/acl/acl_base.h"5+#include <acl/acl_base.h>
6-#include "third_party/acl/inc/acl/acl_rt.h"6+#include <acl/acl_rt.h>
7#include "torch_npu/csrc/core/npu/NPUCachingAllocator.h"7#include "torch_npu/csrc/core/npu/NPUCachingAllocator.h"
8 8 
9extern "C" {9extern "C" {
@@ -335,7 +335,7 @@ class TestRpc(TestCase):
335 335 
336 @skipIfUnsupportMultiNPU(2)336 @skipIfUnsupportMultiNPU(2)
337 def test_async_call_for_cpu(self):337 def test_async_call_for_cpu(self):
338- inputs = [torch.rand(1024, 1024).cpu(), torch.rand(1024, 1024, 1024).cpu()]338+ inputs = [torch.rand(1024, 1024).cpu(), torch.rand(1024, 1024, 4).cpu()]
339 self._test_multiprocess(TestRpc._test_async_call_for_cpu, inputs, self.world_size_2p)339 self._test_multiprocess(TestRpc._test_async_call_for_cpu, inputs, self.world_size_2p)
340 340 
341 @skipIfUnsupportMultiNPU(2)341 @skipIfUnsupportMultiNPU(2)
@@ -23,7 +23,11 @@ def create_build_path(build_directory):
23 23 
24 24 
25def build_stub(base_dir):25def build_stub(base_dir):
26- build_stub_cmd = ["sh", os.path.join(base_dir, "third_party/acl/libs/build_stub.sh")]26+ build_stub_cmd = [
27+ "sh",
28+ os.path.join(base_dir, "third_party/acl/libs/build_stub.sh"),
29+ os.path.join(PYTORCH_NPU_INSTALL_PATH, "include"),
30+ ]
27 if subprocess.call(build_stub_cmd) != 0:31 if subprocess.call(build_stub_cmd) != 0:
28 raise RuntimeError(f"Failed to build stub: {build_stub_cmd}")32 raise RuntimeError(f"Failed to build stub: {build_stub_cmd}")
29 33 
@@ -43,7 +47,6 @@ class TestAllocatorTraceTracker(TestCase):
43 torch_npu_lib_path = os.path.join(PYTORCH_NPU_INSTALL_PATH, "lib")47 torch_npu_lib_path = os.path.join(PYTORCH_NPU_INSTALL_PATH, "lib")
44 extra_include_paths = [48 extra_include_paths = [
45 os.path.join(PYTORCH_NPU_INSTALL_PATH, "include"),49 os.path.join(PYTORCH_NPU_INSTALL_PATH, "include"),
46- os.path.join(PYTORCH_NPU_INSTALL_PATH, "include", "third_party", "acl", "inc"),
47 ]50 ]
48 extra_ldflags = [51 extra_ldflags = [
49 f"-L{cann_lib_path}",52 f"-L{cann_lib_path}",
@@ -23,7 +23,11 @@ def create_build_path(build_directory):
23 23 
24 24 
25def build_stub(base_dir):25def build_stub(base_dir):
26- build_stub_cmd = ["sh", os.path.join(base_dir, 'third_party/acl/libs/build_stub.sh')]26+ build_stub_cmd = [
27+ "sh",
28+ os.path.join(base_dir, 'third_party/acl/libs/build_stub.sh'),
29+ os.path.join(PYTORCH_NPU_INSTALL_PATH, "include"),
30+ ]
27 if subprocess.call(build_stub_cmd) != 0:31 if subprocess.call(build_stub_cmd) != 0:
28 raise RuntimeError('Failed to build stub: {}'.format(build_stub_cmd))32 raise RuntimeError('Failed to build stub: {}'.format(build_stub_cmd))
29 33 
@@ -56,7 +60,6 @@ class TestPluggableAllocator(TestCase):
56 extra_ldflags.append(f"-L{PYTORCH_INSTALL_PATH}")60 extra_ldflags.append(f"-L{PYTORCH_INSTALL_PATH}")
57 extra_include_paths = [os.path.join(TEST_DIR, "cpp_extensions")]61 extra_include_paths = [os.path.join(TEST_DIR, "cpp_extensions")]
58 extra_include_paths.append(os.path.join(PYTORCH_NPU_INSTALL_PATH, "include"))62 extra_include_paths.append(os.path.join(PYTORCH_NPU_INSTALL_PATH, "include"))
59- extra_include_paths.append(os.path.join(PYTORCH_NPU_INSTALL_PATH, 'include', 'third_party', 'acl', 'inc'))
60 63 
61 cls.module = torch.utils.cpp_extension.load(64 cls.module = torch.utils.cpp_extension.load(
62 name="pluggable_allocator_extensions",65 name="pluggable_allocator_extensions",
@@ -41,6 +41,7 @@ def build_stub(base_dir):
41 build_stub_cmd = [41 build_stub_cmd = [
42 "sh",42 "sh",
43 os.path.join(base_dir, "third_party/acl/libs/build_stub.sh"),43 os.path.join(base_dir, "third_party/acl/libs/build_stub.sh"),
44+ os.path.join(PYTORCH_NPU_INSTALL_PATH, "include"),
44 ]45 ]
45 if subprocess.call(build_stub_cmd) != 0:46 if subprocess.call(build_stub_cmd) != 0:
46 raise RuntimeError(f"Failed to build stub: {build_stub_cmd}")47 raise RuntimeError(f"Failed to build stub: {build_stub_cmd}")
@@ -79,7 +80,6 @@ class TestSanitizerPluggableAllocator(TestCase):
79 extra_ldflags.append(f"-L{PYTORCH_INSTALL_PATH}")80 extra_ldflags.append(f"-L{PYTORCH_INSTALL_PATH}")
80 extra_include_paths = [os.path.join(TEST_DIR, "cpp_extensions")]81 extra_include_paths = [os.path.join(TEST_DIR, "cpp_extensions")]
81 extra_include_paths.append(os.path.join(PYTORCH_NPU_INSTALL_PATH, 'include'))82 extra_include_paths.append(os.path.join(PYTORCH_NPU_INSTALL_PATH, 'include'))
82- extra_include_paths.append(os.path.join(PYTORCH_NPU_INSTALL_PATH, 'include', 'third_party', 'acl', 'inc'))
83 83 
84 cls.module = torch.utils.cpp_extension.load(84 cls.module = torch.utils.cpp_extension.load(
85 name="sanitizer_pluggable_allocator_extensions",85 name="sanitizer_pluggable_allocator_extensions",
@@ -9,6 +9,8 @@ from torch_npu.testing.common_utils import create_common_tensor, check_operators
9 9 
10os.environ["COMBINED_ENABLE"] = "1" # Open combined-view cases optimization10os.environ["COMBINED_ENABLE"] = "1" # Open combined-view cases optimization
11 11 
12+SKIP_REASON = "Temporarily skipped; see https://gitcode.com/Ascend/pytorch/issues/4356"
13+ 
12# Optimized view Ops contains Transpose, permute, narrow, strideslice, select, unfold14# Optimized view Ops contains Transpose, permute, narrow, strideslice, select, unfold
13 15 
14# The test case is a continuous optimization test case for aclop16# The test case is a continuous optimization test case for aclop
@@ -19,6 +21,7 @@ os.environ["COMBINED_ENABLE"] = "1" # Open combined-view cases optimization
19 21 
20 22 
21class SingleViewCopyToContiguous(TestCase):23class SingleViewCopyToContiguous(TestCase):
24+ @unittest.skip(SKIP_REASON)
22 def test_view_copy(self, device="npu"):25 def test_view_copy(self, device="npu"):
23 dtype_list1 = [np.float16, np.float32]26 dtype_list1 = [np.float16, np.float32]
24 format_list1 = [0, 3, 29]27 format_list1 = [0, 3, 29]
@@ -66,6 +69,7 @@ class SingleViewCopyToContiguous(TestCase):
66 cpu_out2 = cpu_input.view(1, 6, cpu_input.size(2) * cpu_input.size(3), 1).clone()69 cpu_out2 = cpu_input.view(1, 6, cpu_input.size(2) * cpu_input.size(3), 1).clone()
67 self.assertRtolEqual(npu_out2.to("cpu").numpy(), cpu_out2.numpy())70 self.assertRtolEqual(npu_out2.to("cpu").numpy(), cpu_out2.numpy())
68 71 
72+ @unittest.skip(SKIP_REASON)
69 def test_unsqueeze_copy(self, device="npu"):73 def test_unsqueeze_copy(self, device="npu"):
70 dtype_list2 = [np.float16, np.float32]74 dtype_list2 = [np.float16, np.float32]
71 format_list2 = [2, 3, 29]75 format_list2 = [2, 3, 29]
@@ -98,6 +102,7 @@ class SingleViewCopyToContiguous(TestCase):
98 cpu_out = cpu_input.unsqueeze(i).clone()102 cpu_out = cpu_input.unsqueeze(i).clone()
99 self.assertRtolEqual(npu_out.to("cpu").numpy(), cpu_out.numpy())103 self.assertRtolEqual(npu_out.to("cpu").numpy(), cpu_out.numpy())
100 104 
105+ @unittest.skip(SKIP_REASON)
101 def test_flatten_copy(self, device="npu"):106 def test_flatten_copy(self, device="npu"):
102 dtype_list3 = [np.float16, np.float32]107 dtype_list3 = [np.float16, np.float32]
103 format_list3 = [0, 3, 29]108 format_list3 = [0, 3, 29]
@@ -127,6 +132,7 @@ class SingleViewCopyToContiguous(TestCase):
127 cpu_out = torch.flatten(cpu_input, 0, 1).clone()132 cpu_out = torch.flatten(cpu_input, 0, 1).clone()
128 self.assertRtolEqual(npu_out.to("cpu").numpy(), cpu_out.numpy())133 self.assertRtolEqual(npu_out.to("cpu").numpy(), cpu_out.numpy())
129 134 
135+ @unittest.skip(SKIP_REASON)
130 def test_narrow_at_first_axis_copy(self, device="npu"):136 def test_narrow_at_first_axis_copy(self, device="npu"):
131 # this case: slice at the first dim, tensor with offset remains contiguous137 # this case: slice at the first dim, tensor with offset remains contiguous
132 dtype_list4 = [np.float16, np.float32]138 dtype_list4 = [np.float16, np.float32]
@@ -1,20 +1,23 @@
1#!/bin/bash1#!/bin/bash
2 2 
3+set -e
4+ 
3CDIR="$(cd "$(dirname "$0")" ; pwd -P)"5CDIR="$(cd "$(dirname "$0")" ; pwd -P)"
4 6 
5-cd ${CDIR}7+cd "${CDIR}"
8+ 
9+ACL_INCLUDE_DIR="${1:-../inc}"
6 10 
7gcc -fPIC -shared -o libhccl.so -I./ hccl.cpp11gcc -fPIC -shared -o libhccl.so -I./ hccl.cpp
8 12 
9-gcc -fPIC -shared -o libascendcl.so -I../inc acl.cpp13+gcc -fPIC -shared -o libascendcl.so -I"${ACL_INCLUDE_DIR}" acl.cpp
10 14 
11-gcc -fPIC -shared -o libacl_op_compiler.so -I../inc acl_op_compiler.cpp15+gcc -fPIC -shared -o libacl_op_compiler.so -I"${ACL_INCLUDE_DIR}" acl_op_compiler.cpp
12 16 
13-gcc -fPIC -shared -o libge_runner.so -I../inc ge_runner.cpp ge_api.cpp17+gcc -fPIC -shared -o libge_runner.so -I"${ACL_INCLUDE_DIR}" ge_runner.cpp ge_api.cpp
14 18 
15-gcc -fPIC -shared -o libgraph.so -I../inc graph.cpp operator_factory.cpp operator.cpp tensor.cpp19+gcc -fPIC -shared -o libgraph.so -I"${ACL_INCLUDE_DIR}" graph.cpp operator_factory.cpp operator.cpp tensor.cpp
16 20 
17-gcc -fPIC -shared -o libacl_tdt_channel.so -I../inc acl_tdt.cpp21+gcc -fPIC -shared -o libacl_tdt_channel.so -I"${ACL_INCLUDE_DIR}" acl_tdt.cpp
18- 
19-gcc -fPIC -shared -o libascend_ml.so -I../inc aml_fwk_detect.cpp
20 22 
23+gcc -fPIC -shared -o libascend_ml.so -I"${ACL_INCLUDE_DIR}" aml_fwk_detect.cpp
@@ -12,7 +12,7 @@
12#define HCCL_H_12#define HCCL_H_
13 13 
14#include "third_party/hccl/inc/hccl/hccl_types.h"14#include "third_party/hccl/inc/hccl/hccl_types.h"
15-#include "third_party/acl/inc/acl/acl.h"15+#include <acl/acl.h>
16 16 
17#ifdef __cplusplus17#ifdef __cplusplus
18extern "C" {18extern "C" {
@@ -95,13 +95,11 @@ def _build_npu_ext(obj_name: str, src_path, src_dir) -> str:
95 95 
96 torch_npu_dir = torch_npu_root / "include"96 torch_npu_dir = torch_npu_root / "include"
97 torch_npu_lib_dir = torch_npu_root / "lib"97 torch_npu_lib_dir = torch_npu_root / "lib"
98- acl_inc_dir = torch_npu_dir / "third_party" / "acl" / "inc"
99 98 
100 cc_cmd += [99 cc_cmd += [
101 f"-I{torch_npu_dir}",100 f"-I{torch_npu_dir}",
102 f"-I{cpp_common_dir}",101 f"-I{cpp_common_dir}",
103 f"-L{torch_npu_lib_dir}",102 f"-L{torch_npu_lib_dir}",
104- f"-I{acl_inc_dir}",
105 "-ltorch_npu",103 "-ltorch_npu",
106 f"-Wl,-rpath",104 f"-Wl,-rpath",
107 "-std=c++17",105 "-std=c++17",
@@ -43,7 +43,7 @@ def include_paths(npu: bool = False) -> List[str]:
43 os.path.join(lib_include, 'TH'),43 os.path.join(lib_include, 'TH'),
44 os.path.join(lib_include, 'THC')44 os.path.join(lib_include, 'THC')
45 ]45 ]
46- include_path = os.path.join(PYTORCH_NPU_INSTALL_PATH, "include", "third_party", "acl", "inc")46+ include_path = os.path.join(PYTORCH_NPU_INSTALL_PATH, "include")
47 paths.extend([include_path])47 paths.extend([include_path])
48 if npu:48 if npu:
49 ASCEND_HOME = get_ascend_home()49 ASCEND_HOME = get_ascend_home()
@@ -55,7 +55,6 @@ def include_paths(npu: bool = False) -> List[str]:
55 os.path.join(ASCEND_HOME, "include/experiment/msprof"),55 os.path.join(ASCEND_HOME, "include/experiment/msprof"),
56 ])56 ])
57 57 
58- paths.append(os.path.join(PYTORCH_NPU_INSTALL_PATH, "include"))
59 return paths58 return paths
60 59 
61 60 
@@ -163,4 +162,4 @@ def patch_get_cpp_torch_device_options():
163 162 
164 163 
165def patch_get_optimization_cflags():164def patch_get_optimization_cflags():
166- cpp_builder._get_optimization_cflags = _get_optimization_cflags165+ cpp_builder._get_optimization_cflags = _get_optimization_cflags
@@ -8,7 +8,7 @@
8#include "torch_npu/csrc/aten/NPUNativeFunctions.h"8#include "torch_npu/csrc/aten/NPUNativeFunctions.h"
9#include "torch_npu/csrc/core/NPUBridge.h"9#include "torch_npu/csrc/core/NPUBridge.h"
10#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"10#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"
11-#include "third_party/acl/inc/acl/acl.h"11+#include <acl/acl.h>
12 12 
13namespace at_npu {13namespace at_npu {
14namespace native {14namespace native {
@@ -3,7 +3,7 @@
3 3 
4#include <ATen/ATen.h>4#include <ATen/ATen.h>
5 5 
6-#include "third_party/acl/inc/acl/acl_base.h"6+#include <acl/acl_base.h>
7 7 
8namespace at_npu {8namespace at_npu {
9namespace native {9namespace native {
@@ -2,8 +2,8 @@
2#include <ATen/NativeFunctions.h>2#include <ATen/NativeFunctions.h>
3#include <ATen/Dispatch_v2.h>3#include <ATen/Dispatch_v2.h>
4 4 
5-#include "third_party/acl/inc/acl/acl_base.h"5+#include <acl/acl_base.h>
6-#include "third_party/acl/inc/acl/acl_rt.h"6+#include <acl/acl_rt.h>
7#include "torch_npu/csrc/core/npu/NPUStream.h"7#include "torch_npu/csrc/core/npu/NPUStream.h"
8#include "torch_npu/csrc/framework/utils/CalcuOpUtil.h"8#include "torch_npu/csrc/framework/utils/CalcuOpUtil.h"
9#include "torch_npu/csrc/aten/NPUNativeFunctions.h"9#include "torch_npu/csrc/aten/NPUNativeFunctions.h"
@@ -23,7 +23,7 @@
23#include "torch_npu/csrc/aten/common/ResizeNpu.h"23#include "torch_npu/csrc/aten/common/ResizeNpu.h"
24#include "torch_npu/csrc/framework/StorageDescHelper.h"24#include "torch_npu/csrc/framework/StorageDescHelper.h"
25#include "torch_npu/csrc/core/npu/NPUGuard.h"25#include "torch_npu/csrc/core/npu/NPUGuard.h"
26-#include "third_party/acl/inc/acl/acl_base.h"26+#include <acl/acl_base.h>
27#include "op_plugin/OpInterface.h"27#include "op_plugin/OpInterface.h"
28 28 
29namespace {29namespace {
@@ -3,7 +3,7 @@
3#include "torch_npu/csrc/core/npu/NPUGuard.h"3#include "torch_npu/csrc/core/npu/NPUGuard.h"
4#include "torch_npu/csrc/core/NPUSerialization.h"4#include "torch_npu/csrc/core/NPUSerialization.h"
5#include "torch_npu/csrc/framework/FormatHelper.h"5#include "torch_npu/csrc/framework/FormatHelper.h"
6-#include "third_party/acl/inc/acl/acl_base.h"6+#include <acl/acl_base.h>
7#include "torch_npu/csrc/framework/StorageDescHelper.h"7#include "torch_npu/csrc/framework/StorageDescHelper.h"
8 8 
9namespace torch_npu {9namespace torch_npu {
@@ -8,8 +8,8 @@
8#include <c10/util/typeid.h>8#include <c10/util/typeid.h>
9#include <c10/util/order_preserving_flat_hash_map.h>9#include <c10/util/order_preserving_flat_hash_map.h>
10 10 
11-#include "third_party/acl/inc/acl/acl_rt.h"11+#include <acl/acl_rt.h>
12-#include "third_party/acl/inc/acl/acl_base.h"12+#include <acl/acl_base.h>
13 13 
14namespace torch_npu {14namespace torch_npu {
15 15 
@@ -5,7 +5,7 @@
5 5 
6#include "torch_npu/csrc/framework/StorageDescHelper.h"6#include "torch_npu/csrc/framework/StorageDescHelper.h"
7#include "torch_npu/csrc/core/NPUTensorImpl.h"7#include "torch_npu/csrc/core/NPUTensorImpl.h"
8-#include "third_party/acl/inc/acl/acl_rt.h"8+#include <acl/acl_rt.h>
9#include "torch_npu/csrc/core/NPUStorageImpl.h"9#include "torch_npu/csrc/core/NPUStorageImpl.h"
10 10 
11namespace torch_npu {11namespace torch_npu {
@@ -6,8 +6,8 @@
6#include "torch_npu/csrc/core/npu/NPUMacros.h"6#include "torch_npu/csrc/core/npu/NPUMacros.h"
7#include "torch_npu/csrc/core/npu/NPUStream.h"7#include "torch_npu/csrc/core/npu/NPUStream.h"
8#include "torch_npu/csrc/core/npu/NPUException.h"8#include "torch_npu/csrc/core/npu/NPUException.h"
9-#include <third_party/acl/inc/acl/acl.h>9+#include <acl/acl.h>
10-#include <third_party/acl/inc/acl/acl_rt.h>10+#include <acl/acl_rt.h>
11 11 
12#include <c10/core/DeviceGuard.h>12#include <c10/core/DeviceGuard.h>
13#include <ATen/DeviceGuard.h>13#include <ATen/DeviceGuard.h>
@@ -9,7 +9,7 @@
9#include "torch_npu/csrc/core/npu/register/FunctionLoader.h"9#include "torch_npu/csrc/core/npu/register/FunctionLoader.h"
10#include "torch_npu/csrc/core/npu/NPUException.h"10#include "torch_npu/csrc/core/npu/NPUException.h"
11#include "torch_npu/csrc/core/npu/interface/AclInterface.h"11#include "torch_npu/csrc/core/npu/interface/AclInterface.h"
12-#include "third_party/acl/inc/acl/acl.h"12+#include <acl/acl.h>
13 13 
14 14 
15constexpr size_t kVersionIndex1 = 1;15constexpr size_t kVersionIndex1 = 1;
@@ -17,8 +17,8 @@
17#include <c10/util/llvmMathExtras.h>17#include <c10/util/llvmMathExtras.h>
18#include <c10/util/ScopeExit.h>18#include <c10/util/ScopeExit.h>
19 19 
20-#include "third_party/acl/inc/acl/acl_base.h"20+#include <acl/acl_base.h>
21-#include "third_party/acl/inc/acl/acl_rt.h"21+#include <acl/acl_rt.h>
22#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"22#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"
23#include "torch_npu/csrc/core/npu/NPUCachingAllocator.h"23#include "torch_npu/csrc/core/npu/NPUCachingAllocator.h"
24#include "torch_npu/csrc/core/npu/NPUAllocatorConfig.h"24#include "torch_npu/csrc/core/npu/NPUAllocatorConfig.h"
@@ -4,7 +4,7 @@
4#include "torch_npu/csrc/core/npu/NPUMacros.h"4#include "torch_npu/csrc/core/npu/NPUMacros.h"
5#include "torch_npu/csrc/core/npu/NPUGuard.h"5#include "torch_npu/csrc/core/npu/NPUGuard.h"
6#include "torch_npu/csrc/core/npu/NPUFunctions.h"6#include "torch_npu/csrc/core/npu/NPUFunctions.h"
7-#include "third_party/acl/inc/acl/acl.h"7+#include <acl/acl.h>
8#include <cstdint>8#include <cstdint>
9#include <utility>9#include <utility>
10 10 
@@ -5,7 +5,7 @@
5#include <unordered_set>5#include <unordered_set>
6#include <c10/core/thread_pool.h>6#include <c10/core/thread_pool.h>
7#include <c10/util/flat_hash_map.h>7#include <c10/util/flat_hash_map.h>
8-#include <third_party/acl/inc/acl/acl.h>8+#include <acl/acl.h>
9 9 
10#include "torch_npu/csrc/core/npu/NPUException.h"10#include "torch_npu/csrc/core/npu/NPUException.h"
11 11 
@@ -49,4 +49,4 @@ private:
49 std::unordered_set<aclrtEvent> ipc_events_;49 std::unordered_set<aclrtEvent> ipc_events_;
50};50};
51 51 
52-} // namespace c10_npu52+} // namespace c10_npu
@@ -15,7 +15,7 @@
15#include <regex>15#include <regex>
16#include <c10/macros/Macros.h>16#include <c10/macros/Macros.h>
17#include <c10/util/Exception.h>17#include <c10/util/Exception.h>
18-#include <third_party/acl/inc/acl/acl_base.h>18+#include <acl/acl_base.h>
19#include "torch_npu/csrc/core/npu/NPUMacros.h"19#include "torch_npu/csrc/core/npu/NPUMacros.h"
20#include "torch_npu/csrc/core/npu/interface/AclInterface.h"20#include "torch_npu/csrc/core/npu/interface/AclInterface.h"
21#include "torch_npu/csrc/core/npu/NPUErrorCodes.h"21#include "torch_npu/csrc/core/npu/NPUErrorCodes.h"
@@ -11,7 +11,7 @@
11#include "torch_npu/csrc/core/npu/register/OptionsManager.h"11#include "torch_npu/csrc/core/npu/register/OptionsManager.h"
12#include "torch_npu/csrc/core/npu/GetCANNInfo.h"12#include "torch_npu/csrc/core/npu/GetCANNInfo.h"
13#include "torch_npu/csrc/framework/interface/EnvVariables.h"13#include "torch_npu/csrc/framework/interface/EnvVariables.h"
14-#include "third_party/acl/inc/acl/acl_rt.h"14+#include <acl/acl_rt.h>
15#ifndef BUILD_LIBTORCH15#ifndef BUILD_LIBTORCH
16#include "torch_npu/csrc/sanitizer/NPUTrace.h"16#include "torch_npu/csrc/sanitizer/NPUTrace.h"
17#endif17#endif
@@ -16,7 +16,7 @@
16#include "torch_npu/csrc/core/npu/npu_log.h"16#include "torch_npu/csrc/core/npu/npu_log.h"
17#include "torch_npu/csrc/core/npu/NPUMacros.h"17#include "torch_npu/csrc/core/npu/NPUMacros.h"
18#include "torch_npu/csrc/core/npu/NPUStream.h"18#include "torch_npu/csrc/core/npu/NPUStream.h"
19-#include <third_party/acl/inc/acl/acl.h>19+#include <acl/acl.h>
20 20 
21namespace c10_npu {21namespace c10_npu {
22 22 
@@ -4,7 +4,7 @@
4#include "torch_npu/csrc/core/npu/NPUStreamUtils.h"4#include "torch_npu/csrc/core/npu/NPUStreamUtils.h"
5#include "torch_npu/csrc/aten/NPUGeneratorImpl.h"5#include "torch_npu/csrc/aten/NPUGeneratorImpl.h"
6#include "torch_npu/csrc/core/npu/register/OptionRegister.h"6#include "torch_npu/csrc/core/npu/register/OptionRegister.h"
7-#include "third_party/acl/inc/acl/error_codes/rt_error_codes.h"7+#include <acl/error_codes/rt_error_codes.h>
8#include "torch_npu/csrc/core/npu/sys_ctrl/npu_sys_ctrl.h"8#include "torch_npu/csrc/core/npu/sys_ctrl/npu_sys_ctrl.h"
9#include "torch_npu/csrc/core/npu/GetCANNInfo.h"9#include "torch_npu/csrc/core/npu/GetCANNInfo.h"
10 10 
@@ -4,9 +4,9 @@
4#include <c10/core/Device.h>4#include <c10/core/Device.h>
5#include <c10/util/flat_hash_map.h>5#include <c10/util/flat_hash_map.h>
6 6 
7-#include "third_party/acl/inc/acl/acl_base.h"7+#include <acl/acl_base.h>
8-#include "third_party/acl/inc/acl/acl_rt.h"8+#include <acl/acl_rt.h>
9-#include "third_party/acl/inc/acl/super_kernel.h"9+#include <acl/super_kernel.h>
10#include "torch_npu/csrc/core/npu/interface/SkInterface.h"10#include "torch_npu/csrc/core/npu/interface/SkInterface.h"
11#include "torch_npu/csrc/core/npu/NPUGraphsUtils.h"11#include "torch_npu/csrc/core/npu/NPUGraphsUtils.h"
12#include "torch_npu/csrc/core/npu/NPUMacros.h"12#include "torch_npu/csrc/core/npu/NPUMacros.h"
@@ -1,7 +1,7 @@
1#include <vector>1#include <vector>
2#include <c10/util/Exception.h>2#include <c10/util/Exception.h>
3#include <c10/util/irange.h>3#include <c10/util/irange.h>
4-#include <third_party/acl/inc/acl/acl_rt.h>4+#include <acl/acl_rt.h>
5#include "torch_npu/csrc/core/npu/NpuVariables.h"5#include "torch_npu/csrc/core/npu/NpuVariables.h"
6#include "torch_npu/csrc/core/npu/NPUPeerToPeerAccess.h"6#include "torch_npu/csrc/core/npu/NPUPeerToPeerAccess.h"
7#include "torch_npu/csrc/core/npu/NPUGuard.h"7#include "torch_npu/csrc/core/npu/NPUGuard.h"
@@ -20,7 +20,7 @@
20#include <sstream>20#include <sstream>
21#include <sys/time.h>21#include <sys/time.h>
22#include <sys/eventfd.h>22#include <sys/eventfd.h>
23-#include <third_party/acl/inc/acl/acl_rt.h>23+#include <acl/acl_rt.h>
24 24 
25namespace c10_npu {25namespace c10_npu {
26struct timeval delay = { 0, 1 };26struct timeval delay = { 0, 1 };
@@ -7,7 +7,7 @@
7 7 
8#include <c10/core/Device.h>8#include <c10/core/Device.h>
9#include "torch_npu/csrc/logging/LogContext.h"9#include "torch_npu/csrc/logging/LogContext.h"
10-#include <third_party/acl/inc/acl/acl_op.h>10+#include <acl/acl_op.h>
11 11 
12namespace c10_npu {12namespace c10_npu {
13 13 
@@ -184,4 +184,4 @@ public:
184#define REGISTER_QUEUE_FUNC(execF, copyF, releaseF, newF, deleteF, copyReleaseParamF, releaseParamF) \184#define REGISTER_QUEUE_FUNC(execF, copyF, releaseF, newF, deleteF, copyReleaseParamF, releaseParamF) \
185 static ::c10_npu::register_queue_cb::NPUCallBackRegisterBuilder \185 static ::c10_npu::register_queue_cb::NPUCallBackRegisterBuilder \
186 register_queue_func_builder(execF, copyF, releaseF, newF, deleteF, copyReleaseParamF, releaseParamF);186 register_queue_func_builder(execF, copyF, releaseF, newF, deleteF, copyReleaseParamF, releaseParamF);
187-} // namespace c10_npu187+} // namespace c10_npu
@@ -20,7 +20,7 @@
20#include "torch_npu/csrc/core/npu/NPUStreamUtils.h"20#include "torch_npu/csrc/core/npu/NPUStreamUtils.h"
21#include "torch_npu/csrc/core/npu/sys_ctrl/npu_sys_ctrl.h"21#include "torch_npu/csrc/core/npu/sys_ctrl/npu_sys_ctrl.h"
22#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"22#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"
23-#include "third_party/acl/inc/acl/acl_rt.h"23+#include <acl/acl_rt.h>
24#ifndef BUILD_LIBTORCH24#ifndef BUILD_LIBTORCH
25#include "torch_npu/csrc/sanitizer/NPUTrace.h"25#include "torch_npu/csrc/sanitizer/NPUTrace.h"
26#endif26#endif
@@ -10,8 +10,8 @@
10#include "torch_npu/csrc/core/npu/NPUException.h"10#include "torch_npu/csrc/core/npu/NPUException.h"
11#include "torch_npu/csrc/core/npu/NPUQueue.h"11#include "torch_npu/csrc/core/npu/NPUQueue.h"
12#include "torch_npu/csrc/core/npu/npu_log.h"12#include "torch_npu/csrc/core/npu/npu_log.h"
13-#include "third_party/acl/inc/acl/acl.h"13+#include <acl/acl.h>
14-#include "third_party/acl/inc/acl/acl_op.h"14+#include <acl/acl_op.h>
15#include "torch_npu/csrc/aten/NPUNativeFunctions.h"15#include "torch_npu/csrc/aten/NPUNativeFunctions.h"
16 16 
17namespace c10_npu {17namespace c10_npu {
@@ -1,8 +1,8 @@
1#include <unistd.h>1#include <unistd.h>
2#include <c10/util/flat_hash_map.h>2#include <c10/util/flat_hash_map.h>
3 3 
4-#include "third_party/acl/inc/acl/acl_base.h"4+#include <acl/acl_base.h>
5-#include "third_party/acl/inc/acl/acl_rt.h"5+#include <acl/acl_rt.h>
6#include "torch_npu/csrc/core/npu/NPUFunctions.h"6#include "torch_npu/csrc/core/npu/NPUFunctions.h"
7#include "torch_npu/csrc/core/npu/NpuVariables.h"7#include "torch_npu/csrc/core/npu/NpuVariables.h"
8#include "torch_npu/csrc/core/npu/NPUSwappedMemoryAllocator.h"8#include "torch_npu/csrc/core/npu/NPUSwappedMemoryAllocator.h"
@@ -4,8 +4,8 @@
4#include <c10/util/flat_hash_map.h>4#include <c10/util/flat_hash_map.h>
5#include <c10/util/irange.h>5#include <c10/util/irange.h>
6 6 
7-#include "third_party/acl/inc/acl/acl_base.h"7+#include <acl/acl_base.h>
8-#include "third_party/acl/inc/acl/acl_rt.h"8+#include <acl/acl_rt.h>
9#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"9#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"
10#include "torch_npu/csrc/core/npu/register/OptionsManager.h"10#include "torch_npu/csrc/core/npu/register/OptionsManager.h"
11#include "torch_npu/csrc/core/npu/NPUFunctions.h"11#include "torch_npu/csrc/core/npu/NPUFunctions.h"
@@ -7,9 +7,9 @@
7#include "torch_npu/csrc/core/npu/NPUException.h"7#include "torch_npu/csrc/core/npu/NPUException.h"
8#include "torch_npu/csrc/core/npu/NPUFunctions.h"8#include "torch_npu/csrc/core/npu/NPUFunctions.h"
9#include "torch_npu/csrc/core/npu/NPUStream.h"9#include "torch_npu/csrc/core/npu/NPUStream.h"
10-#include "third_party/acl/inc/acl/acl.h"10+#include <acl/acl.h>
11-#include "third_party/acl/inc/acl/acl_base.h"11+#include <acl/acl_base.h>
12-#include "third_party/acl/inc/acl/acl_rt.h"12+#include <acl/acl_rt.h>
13 13 
14namespace c10_npu {14namespace c10_npu {
15namespace impl {15namespace impl {
@@ -2,12 +2,12 @@
2 2 
3#include <c10/core/Device.h>3#include <c10/core/Device.h>
4 4 
5-#include "third_party/acl/inc/acl/acl_rt.h"5+#include <acl/acl_rt.h>
6-#include "third_party/acl/inc/acl/acl_base.h"6+#include <acl/acl_base.h>
7-#include "third_party/acl/inc/acl/acl_mdl.h"7+#include <acl/acl_mdl.h>
8-#include "third_party/acl/inc/acl/acl_prof.h"8+#include <acl/acl_prof.h>
9#include "torch_npu/csrc/core/npu/interface/HcclInterface.h"9#include "torch_npu/csrc/core/npu/interface/HcclInterface.h"
10-#include "third_party/acl/inc/acl/acl.h"10+#include <acl/acl.h>
11 11 
12using aclrtHostFunc = void (*)(void *args);12using aclrtHostFunc = void (*)(void *args);
13struct aclrtMemUsageInfo;13struct aclrtMemUsageInfo;
@@ -6,7 +6,7 @@
6#include <ATen/record_function.h>6#include <ATen/record_function.h>
7#include "torch_npu/csrc/framework/utils/NpuUtils.h"7#include "torch_npu/csrc/framework/utils/NpuUtils.h"
8#include "torch_npu/csrc/framework/NPUDefine.h"8#include "torch_npu/csrc/framework/NPUDefine.h"
9-#include "third_party/acl/inc/acl/acl_rt.h"9+#include <acl/acl_rt.h>
10#ifndef BUILD_LIBTORCH10#ifndef BUILD_LIBTORCH
11#include "torch_npu/csrc/sanitizer/NPUTrace.h"11#include "torch_npu/csrc/sanitizer/NPUTrace.h"
12#endif12#endif
@@ -2,7 +2,7 @@
2 2 
3#include "c10/core/Storage.h"3#include "c10/core/Storage.h"
4#include "torch_npu/csrc/core/npu/NPUStream.h"4#include "torch_npu/csrc/core/npu/NPUStream.h"
5-#include "third_party/acl/inc/acl/acl_rt.h"5+#include <acl/acl_rt.h>
6 6 
7namespace c10_npu {7namespace c10_npu {
8namespace queue {8namespace queue {
@@ -1,5 +1,5 @@
1#pragma once1#pragma once
2-#include "third_party/acl/inc/aml/aml_fwk_detect.h"2+#include <aml/aml_fwk_detect.h>
3 3 
4namespace c10_npu {4namespace c10_npu {
5namespace amlapi {5namespace amlapi {
@@ -1,8 +1,8 @@
1#pragma once1#pragma once
2 2 
3-#include "third_party/acl/inc/acl/super_kernel.h"3+#include <acl/super_kernel.h>
4-#include "third_party/acl/inc/acl/acl_base.h"4+#include <acl/acl_base.h>
5-#include "third_party/acl/inc/acl/acl_mdl.h"5+#include <acl/acl_mdl.h>
6 6 
7namespace c10_npu {7namespace c10_npu {
8namespace skapi {8namespace skapi {
@@ -3,7 +3,7 @@
3#include <iostream>3#include <iostream>
4#include <string>4#include <string>
5#include <stdio.h>5#include <stdio.h>
6-#include "third_party/acl/inc/acl/acl_base.h"6+#include <acl/acl_base.h>
7#include "torch_npu/csrc/core/npu/register/OptionsManager.h"7#include "torch_npu/csrc/core/npu/register/OptionsManager.h"
8 8 
9#if defined(__GNUC__) && __GNUC__ >= 129#if defined(__GNUC__) && __GNUC__ >= 12
@@ -22,8 +22,8 @@
22#include "torch_npu/csrc/core/npu/register/OptionsManager.h"22#include "torch_npu/csrc/core/npu/register/OptionsManager.h"
23#include "torch_npu/csrc/core/npu/NpuVariables.h"23#include "torch_npu/csrc/core/npu/NpuVariables.h"
24#include "torch_npu/csrc/distributed/symm_mem/NPUSHMEMInterface.h"24#include "torch_npu/csrc/distributed/symm_mem/NPUSHMEMInterface.h"
25-#include "third_party/acl/inc/acl/acl_op_compiler.h"25+#include <acl/acl_op_compiler.h>
26-#include "third_party/acl/inc/acl/acl_rt.h"26+#include <acl/acl_rt.h>
27#include "torch_npu/csrc/framework/interface/AclOpCompileInterface.h"27#include "torch_npu/csrc/framework/interface/AclOpCompileInterface.h"
28#include "torch_npu/csrc/framework/LazyInitAclops.h"28#include "torch_npu/csrc/framework/LazyInitAclops.h"
29#include "torch_npu/csrc/core/npu/NPUFunctions.h"29#include "torch_npu/csrc/core/npu/NPUFunctions.h"
@@ -1,6 +1,6 @@
1#pragma once1#pragma once
2 2 
3-#include <third_party/acl/inc/acl/acl.h>3+#include <acl/acl.h>
4#include <map>4#include <map>
5#include <string>5#include <string>
6#include <vector>6#include <vector>
@@ -7,7 +7,7 @@
7#include "torch_npu/csrc/core/npu/NPUMacros.h"7#include "torch_npu/csrc/core/npu/NPUMacros.h"
8#include "torch_npu/csrc/core/npu/NPUException.h"8#include "torch_npu/csrc/core/npu/NPUException.h"
9#include "torch_npu/csrc/framework/utils/OpPreparation.h"9#include "torch_npu/csrc/framework/utils/OpPreparation.h"
10-#include "third_party/acl/inc/acl/acl_base.h"10+#include <acl/acl_base.h>
11 11 
12namespace c10_npu {12namespace c10_npu {
13const int g_toAclOffset = 256;13const int g_toAclOffset = 256;
@@ -33,8 +33,8 @@
33#include <arpa/inet.h>33#include <arpa/inet.h>
34 34 
35#include "op_plugin/OpInterface.h"35#include "op_plugin/OpInterface.h"
36-#include "third_party/acl/inc/acl/acl.h"36+#include <acl/acl.h>
37-#include "third_party/acl/inc/acl/acl_base.h"37+#include <acl/acl_base.h>
38#include "torch_npu/csrc/aten/CustomFunctions.h"38#include "torch_npu/csrc/aten/CustomFunctions.h"
39#include "torch_npu/csrc/aten/NPUNativeFunctions.h"39#include "torch_npu/csrc/aten/NPUNativeFunctions.h"
40#include "torch_npu/csrc/core/npu/GetCANNInfo.h"40#include "torch_npu/csrc/core/npu/GetCANNInfo.h"
@@ -16,7 +16,7 @@
16 16 
17#include "third_party/Tensorpipe/tensorpipe/common/device_id.h"17#include "third_party/Tensorpipe/tensorpipe/common/device_id.h"
18#include "third_party/Tensorpipe/tensorpipe/tensorpipe.h"18#include "third_party/Tensorpipe/tensorpipe/tensorpipe.h"
19-#include "third_party/acl/inc/acl/acl_rt.h"19+#include <acl/acl_rt.h>
20#include "torch_npu/csrc/core/npu/sys_ctrl/npu_sys_ctrl.h"20#include "torch_npu/csrc/core/npu/sys_ctrl/npu_sys_ctrl.h"
21#include "torch_npu/csrc/distributed/rpc/tensorpipe_utils.h"21#include "torch_npu/csrc/distributed/rpc/tensorpipe_utils.h"
22#include "torch_npu/csrc/core/npu/NPUFunctions.h"22#include "torch_npu/csrc/core/npu/NPUFunctions.h"
@@ -362,7 +362,7 @@ void TensorPipeAgent::checkAndSetStaticGroup(const c10::intrusive_ptr<::c10d::St
362 returnedVec = store->compareSet(isStaticGroupKey, std::vector<uint8_t>(), isStaticGroupVec);362 returnedVec = store->compareSet(isStaticGroupKey, std::vector<uint8_t>(), isStaticGroupVec);
363 std::string returnedVal = std::string(returnedVec.begin(), returnedVec.end());363 std::string returnedVal = std::string(returnedVec.begin(), returnedVec.end());
364 // In both cases, the returned value should be the value of isStaticGroupStr,364 // In both cases, the returned value should be the value of isStaticGroupStr,
365- // otherwise there is a discrepency with initialization among one of the365+ // otherwise there is a discrepancy with initialization among one of the
366 // members366 // members
367}367}
368 368 
@@ -3,7 +3,7 @@
3#include <cstddef>3#include <cstddef>
4#include <cstdint>4#include <cstdint>
5#include "third_party/shmem/include/shmem_host_def.h"5#include "third_party/shmem/include/shmem_host_def.h"
6-#include "third_party/acl/inc/acl/acl_base.h"6+#include <acl/acl_base.h>
7 7 
8namespace c10d {8namespace c10d {
9namespace symmetric_memory {9namespace symmetric_memory {
@@ -4,7 +4,7 @@
4#include <ATen/ATen.h>4#include <ATen/ATen.h>
5 5 
6#include "torch_npu/csrc/framework/utils/NPUDefinition.h"6#include "torch_npu/csrc/framework/utils/NPUDefinition.h"
7-#include "third_party/acl/inc/acl/acl_base.h"7+#include <acl/acl_base.h>
8 8 
9namespace at_npu {9namespace at_npu {
10namespace native {10namespace native {
@@ -47,4 +47,4 @@ public:
47} // namespace native47} // namespace native
48} // namespace at_npu48} // namespace at_npu
49 49 
50-#endif // __NATIVE_NPU_UTILS_FORMAT_INFER__50+#endif // __NATIVE_NPU_UTILS_FORMAT_INFER__
@@ -5,7 +5,7 @@
5#include <vector>5#include <vector>
6#include <string>6#include <string>
7#include <utility>7#include <utility>
8-#include "third_party/acl/inc/acl/acl_op_compiler.h"8+#include <acl/acl_op_compiler.h>
9 9 
10namespace at_npu {10namespace at_npu {
11namespace aclops {11namespace aclops {
@@ -27,4 +27,4 @@ void InitializeJitCompilationMode();
27} // namespace aclops27} // namespace aclops
28} // namespace at_npu28} // namespace at_npu
29 29 
30-#endif // AT_NPU_ACLOPS_LAZYINITACLOPS_H_30+#endif // AT_NPU_ACLOPS_LAZYINITACLOPS_H_
@@ -4,8 +4,8 @@
4#include <ATen/ATen.h>4#include <ATen/ATen.h>
5 5 
6#include "torch_npu/csrc/framework/utils/NpuUtils.h"6#include "torch_npu/csrc/framework/utils/NpuUtils.h"
7-#include "third_party/acl/inc/acl/acl.h"7+#include <acl/acl.h>
8-#include "third_party/acl/inc/acl/acl_base.h"8+#include <acl/acl_base.h>
9 9 
10namespace at_npu {10namespace at_npu {
11namespace native {11namespace native {
@@ -39,4 +39,4 @@ public:
39} // namespace native39} // namespace native
40} // namespace at_npu40} // namespace at_npu
41 41 
42-#endif42+#endif
@@ -4,7 +4,7 @@
4#include "torch_npu/csrc/core/npu/NPUStream.h"4#include "torch_npu/csrc/core/npu/NPUStream.h"
5#include "torch_npu/csrc/logging/LogContext.h"5#include "torch_npu/csrc/logging/LogContext.h"
6 6 
7-#include "third_party/acl/inc/acl/acl_base.h"7+#include <acl/acl_base.h>
8#include "torch_npu/csrc/framework/interface/AclOpCompileInterface.h"8#include "torch_npu/csrc/framework/interface/AclOpCompileInterface.h"
9#include "torch_npu/csrc/framework/NPUDefine.h"9#include "torch_npu/csrc/framework/NPUDefine.h"
10#include "torch_npu/csrc/framework/utils/ForceJitCompileList.h"10#include "torch_npu/csrc/framework/utils/ForceJitCompileList.h"
@@ -451,4 +451,4 @@ extern std::recursive_mutex deterministic_launch_mutex;
451} // namespace native451} // namespace native
452} // namespace at_npu452} // namespace at_npu
453 453 
454-#endif454+#endif
@@ -2,7 +2,7 @@
2#define __NATIVE_NPU_TOOLS_AOEUTILS__2#define __NATIVE_NPU_TOOLS_AOEUTILS__
3 3 
4#include <unordered_set>4#include <unordered_set>
5-#include <third_party/acl/inc/acl/acl_op_compiler.h>5+#include <acl/acl_op_compiler.h>
6#include "torch_npu/csrc/core/npu/NPUException.h"6#include "torch_npu/csrc/core/npu/NPUException.h"
7 7 
8namespace at_npu {8namespace at_npu {
@@ -147,4 +147,4 @@ AoeDumpGraphManager& aoe_manager();
147} // namespace native147} // namespace native
148} // namespace at_npu148} // namespace at_npu
149 149 
150-#endif // __NATIVE_NPU_TOOLS_AOEUTILS__150+#endif // __NATIVE_NPU_TOOLS_AOEUTILS__
@@ -3,7 +3,7 @@
3 3 
4#include <c10/util/SmallVector.h>4#include <c10/util/SmallVector.h>
5 5 
6-#include "third_party/acl/inc/acl/acl_base.h"6+#include <acl/acl_base.h>
7#include "torch_npu/csrc/framework/utils/NpuUtils.h"7#include "torch_npu/csrc/framework/utils/NpuUtils.h"
8#include "torch_npu/csrc/framework/utils/NPUDefinition.h"8#include "torch_npu/csrc/framework/utils/NPUDefinition.h"
9 9 
@@ -40,4 +40,4 @@ struct ContiguousTensorDesc {
40} // namespace native40} // namespace native
41} // namespace at_npu41} // namespace at_npu
42 42 
43-#endif43+#endif
@@ -1,10 +1,10 @@
1#ifndef __TORCH_NPU_INTERFACE_ACLINTERFACE__1#ifndef __TORCH_NPU_INTERFACE_ACLINTERFACE__
2#define __TORCH_NPU_INTERFACE_ACLINTERFACE__2#define __TORCH_NPU_INTERFACE_ACLINTERFACE__
3 3 
4-#include "third_party/acl/inc/acl/acl_rt.h"4+#include <acl/acl_rt.h>
5-#include <third_party/acl/inc/acl/acl_base.h>5+#include <acl/acl_base.h>
6-#include <third_party/acl/inc/acl/acl_prof.h>6+#include <acl/acl_prof.h>
7-#include <third_party/acl/inc/acl/acl_op.h>7+#include <acl/acl_op.h>
8 8 
9namespace at_npu {9namespace at_npu {
10namespace native {10namespace native {
@@ -76,4 +76,4 @@ aclError AclopStopDumpArgs(uint32_t dumpType);
76} // namespace native76} // namespace native
77} // namespace at_npu77} // namespace at_npu
78 78 
79-#endif // __TORCH_NPU_INTERFACE_ACLINTERFACE__79+#endif // __TORCH_NPU_INTERFACE_ACLINTERFACE__
@@ -5,7 +5,7 @@
5#include "torch_npu/csrc/core/npu/register/FunctionLoader.h"5#include "torch_npu/csrc/core/npu/register/FunctionLoader.h"
6#include "torch_npu/csrc/framework/interface/AclOpCompileInterface.h"6#include "torch_npu/csrc/framework/interface/AclOpCompileInterface.h"
7#include "torch_npu/csrc/core/npu/register/OptionsManager.h"7#include "torch_npu/csrc/core/npu/register/OptionsManager.h"
8-#include "third_party/acl/inc/acl/acl_base.h"8+#include <acl/acl_base.h>
9 9 
10namespace at_npu10namespace at_npu
11{11{
@@ -207,4 +207,4 @@ aclError AclDestroyAclOpExecutor(aclOpExecutor *executor)
207}207}
208 208 
209 } // namespace native209 } // namespace native
210-} // namespace at_npu210+} // namespace at_npu
@@ -1,7 +1,7 @@
1#ifndef __PLUGIN_NATIVE_NPU_INTERFACE_ACLOPCOMPILE__1#ifndef __PLUGIN_NATIVE_NPU_INTERFACE_ACLOPCOMPILE__
2#define __PLUGIN_NATIVE_NPU_INTERFACE_ACLOPCOMPILE__2#define __PLUGIN_NATIVE_NPU_INTERFACE_ACLOPCOMPILE__
3#include <c10/util/Optional.h>3#include <c10/util/Optional.h>
4-#include "third_party/acl/inc/acl/acl_op_compiler.h"4+#include <acl/acl_op_compiler.h>
5 5 
6typedef struct aclOpExecutor aclOpExecutor;6typedef struct aclOpExecutor aclOpExecutor;
7 7 
@@ -150,4 +150,4 @@ ACL_FUNC_VISIBILITY aclError AclDestroyAclOpExecutor(aclOpExecutor *executor);
150} // namespace native150} // namespace native
151} // namespace at_npu151} // namespace at_npu
152 152 
153-#endif // __NATIVE_NPU_INTERFACE_ACLOPCOMPILE__153+#endif // __NATIVE_NPU_INTERFACE_ACLOPCOMPILE__
@@ -7,7 +7,7 @@
7#include <string>7#include <string>
8#include "torch_npu/csrc/core/npu/NPUException.h"8#include "torch_npu/csrc/core/npu/NPUException.h"
9 9 
10-#include "third_party/acl/inc/acl/acl_mdl.h"10+#include <acl/acl_mdl.h>
11#include "torch_npu/csrc/framework/utils/ForceJitCompileList.h"11#include "torch_npu/csrc/framework/utils/ForceJitCompileList.h"
12#include "torch_npu/csrc/framework/utils/ForceAclnnList.h"12#include "torch_npu/csrc/framework/utils/ForceAclnnList.h"
13#include "torch_npu/csrc/framework/interface/AclOpCompileInterface.h"13#include "torch_npu/csrc/framework/interface/AclOpCompileInterface.h"
@@ -1,7 +1,7 @@
1#include "torch_npu/csrc/framework/interface/MsProfilerInterface.h"1#include "torch_npu/csrc/framework/interface/MsProfilerInterface.h"
2#include "torch_npu/csrc/core/npu/NPUException.h"2#include "torch_npu/csrc/core/npu/NPUException.h"
3#include "torch_npu/csrc/core/npu/register/FunctionLoader.h"3#include "torch_npu/csrc/core/npu/register/FunctionLoader.h"
4-#include "third_party/acl/inc/acl/acl_prof.h"4+#include <acl/acl_prof.h>
5 5 
6namespace at_npu {6namespace at_npu {
7namespace native {7namespace native {
@@ -1,7 +1,7 @@
1#ifndef __TORCH_NPU_MSPROFILERINTERFACE__1#ifndef __TORCH_NPU_MSPROFILERINTERFACE__
2#define __TORCH_NPU_MSPROFILERINTERFACE__2#define __TORCH_NPU_MSPROFILERINTERFACE__
3 3 
4-#include <third_party/acl/inc/acl/acl_prof.h>4+#include <acl/acl_prof.h>
5#include "torch_npu/csrc/core/npu/NPUException.h"5#include "torch_npu/csrc/core/npu/NPUException.h"
6 6 
7namespace at_npu {7namespace at_npu {
@@ -1,7 +1,7 @@
1#include <ATen/record_function.h>1#include <ATen/record_function.h>
2 2 
3-#include "third_party/acl/inc/acl/acl_base.h"3+#include <acl/acl_base.h>
4-#include "third_party/acl/inc/acl/acl_rt.h"4+#include <acl/acl_rt.h>
5#include "torch_npu/csrc/aten/mirror/NPUMemoryOverlap.h"5#include "torch_npu/csrc/aten/mirror/NPUMemoryOverlap.h"
6#include "torch_npu/csrc/core/NPUBridge.h"6#include "torch_npu/csrc/core/NPUBridge.h"
7#include "torch_npu/csrc/core/NPUStorageImpl.h"7#include "torch_npu/csrc/core/NPUStorageImpl.h"
@@ -14,8 +14,8 @@
14#include "torch_npu/csrc/framework/utils/NpuUtils.h"14#include "torch_npu/csrc/framework/utils/NpuUtils.h"
15#include "torch_npu/csrc/core/npu/interface/AclInterface.h"15#include "torch_npu/csrc/core/npu/interface/AclInterface.h"
16#include "torch_npu/csrc/core/npu/npu_log.h"16#include "torch_npu/csrc/core/npu/npu_log.h"
17-#include "third_party/acl/inc/acl/acl_base.h"17+#include <acl/acl_base.h>
18-#include "third_party/acl/inc/acl/acl.h"18+#include <acl/acl.h>
19 19 
20using std::string;20using std::string;
21using std::vector;21using std::vector;
@@ -3,7 +3,7 @@
3 3 
4 4 
5#include <c10/util/SmallVector.h>5#include <c10/util/SmallVector.h>
6-#include <third_party/acl/inc/graph/operator.h>6+#include <graph/operator.h>
7 7 
8#include <functional>8#include <functional>
9#include <vector>9#include <vector>
@@ -21,4 +21,4 @@ using DynamicInputRegFunc = std::function<ge::OperatorPtr(DyNumAndIndex, std::st
21} // namespace native21} // namespace native
22} // namespace at_npu22} // namespace at_npu
23 23 
24-#endif // __NATIVE_NPU_UTILS_NPU_CONFIG__24+#endif // __NATIVE_NPU_UTILS_NPU_CONFIG__
@@ -7,9 +7,9 @@
7#include <ATen/ATen.h>7#include <ATen/ATen.h>
8#include "torch_npu/csrc/core/npu/npu_log.h"8#include "torch_npu/csrc/core/npu/npu_log.h"
9 9 
10-#include "third_party/acl/inc/acl/acl.h"10+#include <acl/acl.h>
11-#include "third_party/acl/inc/acl/acl_base.h"11+#include <acl/acl_base.h>
12-#include "third_party/acl/inc/acl/acl_op.h"12+#include <acl/acl_op.h>
13 13 
14#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"14#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"
15#include "torch_npu/csrc/framework/interface/AclOpCompileInterface.h"15#include "torch_npu/csrc/framework/interface/AclOpCompileInterface.h"
@@ -2,8 +2,8 @@
2 2 
3#ifdef USE_NPU3#ifdef USE_NPU
4 4 
5-#include "third_party/acl/inc/acl/acl_base.h"5+#include <acl/acl_base.h>
6-#include "third_party/acl/inc/acl/acl_rt.h"6+#include <acl/acl_rt.h>
7 7 
8typedef void* NPUdeviceptr;8typedef void* NPUdeviceptr;
9 9 
@@ -5,7 +5,7 @@
5// in model.so, and should not refer to any aten/c10 headers except the stable5// in model.so, and should not refer to any aten/c10 headers except the stable
6// C ABI defined in torch_npu/csrc/inductor/aoti_torch/c/shim.h. The same rule6// C ABI defined in torch_npu/csrc/inductor/aoti_torch/c/shim.h. The same rule
7// applies to other files under torch_npu/csrc/inductor/aoti_runtime/.7// applies to other files under torch_npu/csrc/inductor/aoti_runtime/.
8-#include <third_party/acl/inc/acl/acl_base.h>8+#include <acl/acl_base.h>
9#include <torch/csrc/inductor/aoti_runtime/utils.h>9#include <torch/csrc/inductor/aoti_runtime/utils.h>
10#include <torch_npu/csrc/inductor/aoti_torch/c/shim_npu.h>10#include <torch_npu/csrc/inductor/aoti_torch/c/shim_npu.h>
11 11 
@@ -8,8 +8,8 @@
8#include <torch_npu/csrc/framework/OpCommand.h>8#include <torch_npu/csrc/framework/OpCommand.h>
9#include <torch_npu/csrc/profiler/profiler_mgr.h>9#include <torch_npu/csrc/profiler/profiler_mgr.h>
10 10 
11-#include "third_party/acl/inc/profiling/prof_api.h"11+#include <profiling/prof_api.h>
12-#include "third_party/acl/inc/profiling/prof_common.h"12+#include <profiling/prof_common.h>
13 13 
14struct TilingMem {14struct TilingMem {
15 std::unique_ptr<void, decltype(&aclrtFreeHost)> arg_tiling_host;15 std::unique_ptr<void, decltype(&aclrtFreeHost)> arg_tiling_host;
@@ -1,8 +1,8 @@
1#ifndef BUILD_LIBTORCH1#ifndef BUILD_LIBTORCH
2#include <Python.h>2#include <Python.h>
3#include <functional>3#include <functional>
4-#include "third_party/acl/inc/acl/acl_base.h"4+#include <acl/acl_base.h>
5-#include "third_party/acl/inc/acl/acl_rt.h"5+#include <acl/acl_rt.h>
6#include "torch_npu/csrc/inductor/mlir/hacl_rt.h"6#include "torch_npu/csrc/inductor/mlir/hacl_rt.h"
7 7 
8rtError_t common_launch(char* kernelName, const void* func, uint32_t gridX, void* args, uint32_t argsSize,8rtError_t common_launch(char* kernelName, const void* func, uint32_t gridX, void* args, uint32_t argsSize,
@@ -10,4 +10,4 @@ rtError_t common_launch(char* kernelName, const void* func, uint32_t gridX, void
10rtError_t common_launch_dyn(char* kernelName, void* func, void* tiling_func, int64_t tilingSize, void* arg_tiling_host,10rtError_t common_launch_dyn(char* kernelName, void* func, void* tiling_func, int64_t tilingSize, void* arg_tiling_host,
11 void* arg_tiling_device, uint32_t gridX, void* args, uint32_t argsSize, rtStream_t stream);11 void* arg_tiling_device, uint32_t gridX, void* args, uint32_t argsSize, rtStream_t stream);
12void opcommand_call(const char* name, std::function<int()> launch_call);12void opcommand_call(const char* name, std::function<int()> launch_call);
13-#endif // BUILD_LIBTORCH13+#endif // BUILD_LIBTORCH
@@ -8,8 +8,8 @@
8#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"8#include "torch_npu/csrc/core/npu/interface/AsyncTaskQueueInterface.h"
9#include "torch_npu/csrc/ipc/NPUIPCTypes.h"9#include "torch_npu/csrc/ipc/NPUIPCTypes.h"
10 10 
11-#include "third_party/acl/inc/acl/acl_base.h"11+#include <acl/acl_base.h>
12-#include "third_party/acl/inc/acl/acl_rt.h"12+#include <acl/acl_rt.h>
13 13 
14namespace torch_npu {14namespace torch_npu {
15namespace ipc {15namespace ipc {
@@ -264,4 +264,4 @@ namespace NPUCachingAllocator {
264REGISTER_FREE_MEMORY_CALLBACK("npu_ipc_collect", NpuIPCCollectCallback);264REGISTER_FREE_MEMORY_CALLBACK("npu_ipc_collect", NpuIPCCollectCallback);
265 265 
266} // namespace NPUCachingAllocator266} // namespace NPUCachingAllocator
267-} // namespace c10_npu267+} // namespace c10_npu
@@ -22,8 +22,8 @@
22#include "torch_npu/csrc/ipc/NPUIPCTypes.h"22#include "torch_npu/csrc/ipc/NPUIPCTypes.h"
23#include "torch_npu/csrc/ipc/StorageSharing.h"23#include "torch_npu/csrc/ipc/StorageSharing.h"
24 24 
25-#include "third_party/acl/inc/acl/acl_base.h"25+#include <acl/acl_base.h>
26-#include "third_party/acl/inc/acl/acl_rt.h"26+#include <acl/acl_rt.h>
27 27 
28namespace torch_npu {28namespace torch_npu {
29namespace reductions {29namespace reductions {
@@ -5,9 +5,9 @@
5#include <torch/csrc/jit/python/pybind_utils.h>5#include <torch/csrc/jit/python/pybind_utils.h>
6#include <torch/csrc/utils/pybind.h>6#include <torch/csrc/utils/pybind.h>
7 7 
8-#include "third_party/acl/inc/acl/acl_base.h"8+#include <acl/acl_base.h>
9-#include "third_party/acl/inc/acl/acl_rt.h"9+#include <acl/acl_rt.h>
10-#include "third_party/acl/inc/acl/super_kernel.h"10+#include <acl/super_kernel.h>
11 11 
12struct PendingTensorData {12struct PendingTensorData {
13 PendingTensorData(uintptr_t dataPtr, Py_ssize_t nbytes, PyObject* shape, PyObject* dtype)13 PendingTensorData(uintptr_t dataPtr, Py_ssize_t nbytes, PyObject* shape, PyObject* dtype)
@@ -27,7 +27,7 @@
27#include <torch_npu/csrc/inductor/aoti_runner/pybind.h>27#include <torch_npu/csrc/inductor/aoti_runner/pybind.h>
28 28 
29#include <op_plugin/utils/custom_functions/opapi/FFTCommonOpApi.h>29#include <op_plugin/utils/custom_functions/opapi/FFTCommonOpApi.h>
30-#include <third_party/acl/inc/acl/acl.h>30+#include <acl/acl.h>
31#include <third_party/fmt/include/fmt/format.h>31#include <third_party/fmt/include/fmt/format.h>
32#include <torch_npu/csrc/aten/NPUGeneratorImpl.h>32#include <torch_npu/csrc/aten/NPUGeneratorImpl.h>
33#include <torch_npu/csrc/aten/NPUNativeFunctions.h>33#include <torch_npu/csrc/aten/NPUNativeFunctions.h>
@@ -3,9 +3,9 @@
3#include <torch/csrc/Device.h>3#include <torch/csrc/Device.h>
4#include <torch/csrc/THP.h>4#include <torch/csrc/THP.h>
5 5 
6-#include "third_party/acl/inc/acl/acl.h"6+#include <acl/acl.h>
7-#include "third_party/acl/inc/acl/acl_base.h"7+#include <acl/acl_base.h>
8-#include "third_party/acl/inc/acl/acl_rt.h"8+#include <acl/acl_rt.h>
9#include "torch_npu/csrc/core/npu/NPUGuard.h"9#include "torch_npu/csrc/core/npu/NPUGuard.h"
10#include "torch_npu/csrc/core/npu/sys_ctrl/npu_sys_ctrl.h"10#include "torch_npu/csrc/core/npu/sys_ctrl/npu_sys_ctrl.h"
11#include "torch_npu/csrc/npu/Module.h"11#include "torch_npu/csrc/npu/Module.h"
@@ -7,7 +7,7 @@
7#include <vector>7#include <vector>
8#include <tuple>8#include <tuple>
9 9 
10-#include "third_party/acl/inc/acl/acl_prof.h"10+#include <acl/acl_prof.h>
11 11 
12#include "torch_npu/csrc/toolkit/profiler/common/singleton.h"12#include "torch_npu/csrc/toolkit/profiler/common/singleton.h"
13#include "torch_npu/csrc/toolkit/profiler/common/utils.h"13#include "torch_npu/csrc/toolkit/profiler/common/utils.h"
@@ -7,8 +7,8 @@
7 7 
8#include <ATen/record_function.h>8#include <ATen/record_function.h>
9 9 
10-#include "third_party/acl/inc/acl/acl_base.h"10+#include <acl/acl_base.h>
11-#include "third_party/acl/inc/acl/acl_rt.h"11+#include <acl/acl_rt.h>
12 12 
13#include "torch_npu/csrc/toolkit/profiler/inc/data_reporter.h"13#include "torch_npu/csrc/toolkit/profiler/inc/data_reporter.h"
14#include "torch_npu/csrc/profiler/profiler_mgr.h"14#include "torch_npu/csrc/profiler/profiler_mgr.h"
@@ -4,7 +4,7 @@
4#include <mutex>4#include <mutex>
5#include <map>5#include <map>
6 6 
7-#include "third_party/acl/inc/acl/acl_prof.h"7+#include <acl/acl_prof.h>
8 8 
9#include "torch_npu/csrc/toolkit/profiler/common/singleton.h"9#include "torch_npu/csrc/toolkit/profiler/common/singleton.h"
10#include "torch_npu/csrc/toolkit/profiler/inc/data_dumper.h"10#include "torch_npu/csrc/toolkit/profiler/inc/data_dumper.h"
@@ -7,7 +7,7 @@
7#include "torch_npu/csrc/core/npu/NPUStream.h"7#include "torch_npu/csrc/core/npu/NPUStream.h"
8#include "torch_npu/csrc/core/npu/NPUGuard.h"8#include "torch_npu/csrc/core/npu/NPUGuard.h"
9#include "torch_npu/csrc/core/npu/interface/AclInterface.h"9#include "torch_npu/csrc/core/npu/interface/AclInterface.h"
10-#include "third_party/acl/inc/acl/acl_rt.h"10+#include <acl/acl_rt.h>
11 11 
12namespace torch_npu {12namespace torch_npu {
13namespace profiler {13namespace profiler {
@@ -1,7 +1,6 @@
1import os1import os
2import setuptools2import setuptools
3 3 
4-import torch
5import torch.utils.cpp_extension as TorchExtension4import torch.utils.cpp_extension as TorchExtension
6 5 
7import torch_npu6import torch_npu
@@ -38,7 +37,6 @@ def NpuExtension(name, sources, *args, **kwargs):
38 torch_npu_dir = PYTORCH_NPU_INSTALL_PATH37 torch_npu_dir = PYTORCH_NPU_INSTALL_PATH
39 include_dirs = kwargs.get('include_dirs', [])38 include_dirs = kwargs.get('include_dirs', [])
40 include_dirs.append(os.path.join(torch_npu_dir, 'include'))39 include_dirs.append(os.path.join(torch_npu_dir, 'include'))
41- include_dirs.append(os.path.join(torch_npu_dir, 'include', 'third_party', 'acl', 'inc'))
42 include_dirs.append(os.path.join(torch_npu_dir, 'include', 'third_party', 'hccl', 'inc'))40 include_dirs.append(os.path.join(torch_npu_dir, 'include', 'third_party', 'hccl', 'inc'))
43 include_dirs += TorchExtension.include_paths()41 include_dirs += TorchExtension.include_paths()
44 kwargs['include_dirs'] = include_dirs42 kwargs['include_dirs'] = include_dirs