We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7974d1 commit 01e697bCopy full SHA for 01e697b
1 file changed
source/op/pd/setup.py
@@ -0,0 +1,23 @@
1
+# SPDX-License-Identifier: LGPL-3.0-or-later
2
+import os
3
+
4
5
+def main():
6
+ current_dir = os.path.abspath(os.getcwd())
7
+ script_dir = os.path.abspath(os.path.dirname(__file__))
8
9
+ if current_dir != script_dir:
10
+ raise RuntimeError(
11
+ f"[ERROR] Please run this script under directory: `{script_dir}`"
12
+ )
13
14
+ from paddle.utils.cpp_extension import (
15
+ CppExtension,
16
+ setup,
17
18
19
+ setup(name="deepmd_op_pd", ext_modules=CppExtension(sources=["comm.cc"]))
20
21
22
+if __name__ == "__main__":
23
+ main()
0 commit comments