mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-08 20:40:34 +00:00
[Inference/Refactor] Refactor compilation mechanism and unified multi hw (#5613)
* refactor compilation mechanism and unified multi hw * fix file path bug * add init.py to make pybind a module to avoid relative path error caused by softlink * delete duplicated micros * fix micros bug in gcc
This commit is contained in:
@@ -25,6 +25,9 @@ class _CppExtension(_Extension):
|
||||
def csrc_abs_path(self, path):
|
||||
return os.path.join(self.relative_to_abs_path("csrc"), path)
|
||||
|
||||
def pybind_abs_path(self, path):
|
||||
return os.path.join(self.relative_to_abs_path("pybind"), path)
|
||||
|
||||
def relative_to_abs_path(self, code_path: str) -> str:
|
||||
"""
|
||||
This function takes in a path relative to the colossalai root directory and return the absolute path.
|
||||
@@ -116,6 +119,7 @@ class _CppExtension(_Extension):
|
||||
"""
|
||||
This function should return a list of include files for extensions.
|
||||
"""
|
||||
return [self.csrc_abs_path("")]
|
||||
|
||||
@abstractmethod
|
||||
def cxx_flags(self) -> List[str]:
|
||||
|
Reference in New Issue
Block a user