CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[CINN][New Hardware Update] HIP first PR #65146
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -100,6 +100,8 @@ const Target& DefaultHostTarget(); | |||
|
|||
const Target& DefaultNVGPUTarget(); | |||
|
|||
const Target& DefaultHygonDcuHipTarget(); | |||
|
|||
const Target& DefaultDeviceTarget(); |
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.
这个函数和DefaultTarget的差异是啥?
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.
看起来目前DefaultDeviceTarget()与DefaultTarget()功能相同,后面可考虑移除其中一个。
* add cinn::common::HygonDCUArchHIP * implement HygonDCUArchHIP branchs * some branches are not implemented. * introduce cinn::runtime::BackendAPI. It is a temporary implementation, will be replaced by paddle::phi::backends after resolving circular dependencies.
paddle/cinn/runtime/hip/hip_util.h
Outdated
namespace runtime { | ||
namespace hip { | ||
|
||
#define HIP_CALL(func) \ |
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.
【下一个pr重构】重命名成HIP_CHECK(expr)
paddle/cinn/runtime/hip/hip_util.h
Outdated
} \ | ||
} | ||
|
||
#define HIP_DRIVER_CALL(func) \ |
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.
【下一个pr重构】重命名成HIP_DRIVER_CHECK(expr)
paddle/cinn/runtime/hip/hip_util.h
Outdated
} \ | ||
} | ||
|
||
#define HIPRTC_CALL(func) \ |
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.
【下一个pr重构】重命名成HIPRTC_CHECK(expr)
@@ -30,10 +30,13 @@ struct ARMArch {}; | |||
|
|||
struct NVGPUArch {}; | |||
|
|||
struct HygonDCUArchHIP {}; |
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.
【下一个PR重构】
define CINN_ARCH_CLASS_NAMES(_macro) \
_macro(X86Arch) \
_macro(ARMArch) \
_macro(NVGPUArch) \
_macro(HygonDCUArchHIP)
#define DEFINE_CINN_ARCH(class_name) struct class_name {};
CINN_ARCH_CLASS_NAMES(DEFINE_CINN_ARCH);
#undef DEFINE_CINN_ARCH
/** | ||
* The architecture used by the target. Determines the instruction set to use. | ||
*/ | ||
using ArchBase = std::variant<UnknownArch, X86Arch, ARMArch, NVGPUArch>; | ||
using ArchBase = |
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.
【下一个PR重构】
using ArchBase = std::variant<
#define LIST_CINN_ARCH_ALTERNATIVE(class_name) class_name,
CINN_ARCH_CLASS_NAMES(LIST_CINN_ARCH_ALTERNATIVE)
#undef LIST_CINN_ARCH_ALTERNATIVE
UnknownArch
>;
* [CINN][New Hardware Update] add HygonDCUArchHIP * add cinn::common::HygonDCUArchHIP * implement HygonDCUArchHIP branchs * some branches are not implemented. * introduce cinn::runtime::BackendAPI. It is a temporary implementation, will be replaced by paddle::phi::backends after resolving circular dependencies. * [CINN][new hardware] modify not implement info * [CINN][new hardware] tile HygonDCUArchHIP * fix compile * fix compile v2 * fix format * fix codestyle * fix approval * fix compile v3 * fix setNvHygon() * Fix APPROVAL : CHECK and LOG(FATAL) * Fix APPROVAL : CHECK * fix compile * fix backendAPI compile
PR Category
CINN
PR Types
New features
Description
HIP后端第一个PR
pcard-79890