[builder] reconfig op_builder for pypi install (#2314)

This commit is contained in:
Jiarui Fang
2023-01-04 16:32:32 +08:00
committed by GitHub
parent a9b27b9265
commit db6eea3583
17 changed files with 13 additions and 332 deletions

View File

@@ -25,10 +25,12 @@ def get_cuda_cc_flag() -> List:
class Builder(object):
def colossalai_src_path(self, code_path):
if os.path.isabs(code_path):
return code_path
current_file_path = Path(__file__)
if os.path.islink(current_file_path.parent):
# symbolic link
return os.path.join(current_file_path.parent.parent.absolute(), code_path)
else:
return os.path.join(Path(__file__).parent.parent.absolute(), code_path)
return os.path.join(current_file_path.parent.parent.absolute(), "colossalai", "kernel", code_path)
def get_cuda_home_include(self):
"""