-
Notifications
You must be signed in to change notification settings - Fork 14
issue/176: 支持macos编译 #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue/176: 支持macos编译 #178
Conversation
scripts/install.py
Outdated
@@ -2,23 +2,89 @@ | |||
import subprocess | |||
import platform | |||
import sys | |||
from set_env import set_env | |||
# 尝试导入 set_env,如果失败则定义一个空函数 | |||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个别这么写,最好是给set_env加一个支持macos平台的功能
scripts/install.py
Outdated
user_provided_flags = " ".join(sys.argv[1:]) | ||
print(f"User provided flags: '{user_provided_flags}'") | ||
install(user_provided_flags) | ||
print("--- InfiniCore Installation Script Finished ---") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文件结尾空行
scripts/install.py
Outdated
install(" ".join(sys.argv[1:])) | ||
print("--- Starting InfiniCore Installation Script ---") | ||
print("Setting up environment variables...") | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要加try catch,这个函数出错直接退
f"{new_lib_path}:{os.environ.get('LD_LIBRARY_PATH', '')}" | ||
) | ||
""" | ||
Sets up environment variables for Infini software, supporting Windows, Linux, and macOS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请按照之前的格式写,不同平台不要串在一起
src/infiniop-test/include/test.hpp
Outdated
@@ -99,7 +99,7 @@ class Test { | |||
\ | |||
std::string toString() const override; \ | |||
\ | |||
~Test(); \ | |||
virtual ~Test(); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不加会报错?
libop_path = find_library_in_infini_root("lib", "libinfiniop.dylib") | ||
librt_path = find_library_in_infini_root("lib", "libinfinirt.dylib") | ||
else: | ||
raise RuntimeError(f"Unsupported operating system: {system_name}") | ||
|
||
assert ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把这个检查和打印信息直接放helper里吧
@@ -98,4 +113,4 @@ def find_library_in_ld_path(subdir, library_name): | |||
lib.infinirtSetDevice.argtypes = [c_int, c_int] | |||
lib.infinirtSetDevice.restype = c_int | |||
|
|||
return lib | |||
return lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
空行
src/infiniop/ops/gemm/info.h
Outdated
BlasMatrix a_matrix; | ||
BlasMatrix b_matrix; | ||
BlasMatrix c_matrix; | ||
|
||
size_t m, n, k, batch; | ||
bool is_transed; | ||
|
||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
能不能把这个放前面。如果用这个,是不是该删了 MatmulInfo() = default;
@@ -47,4 +55,4 @@ infiniStatus_t Descriptor::calculate( | |||
return INFINI_STATUS_SUCCESS; | |||
} | |||
|
|||
} // namespace op::rearrange::cpu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
空行
src/infiniop/ops/gemm/info.h
Outdated
static utils::Result<MatmulInfo> create( | ||
infiniopTensorDescriptor_t c_desc, | ||
infiniopTensorDescriptor_t a_desc, | ||
infiniopTensorDescriptor_t b_desc, | ||
MatrixLayout layout) { | ||
|
||
auto a_matrix = BlasMatrix::create(a_desc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么需要改这里
No description provided.