Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <hip/hip_runtime_api.h>
- #include <hip/hip_runtime.h>
- #define kernel_name "kernel_blur1_s0_y_y___block_id_y"
- #define fileName "halide_asm.co"
- #define HIP_CHECK(status) \
- if (status != hipSuccess) { \
- std::cout << "Got Status: " << status << " at Line: " << __LINE__ << std::endl; \
- exit(0); \
- }
- int main() {
- hipInit(0);
- hipDevice_t device;
- hipCtx_t context;
- hipDeviceGet(&device, 0);
- hipCtxCreate(&context, 0, device);
- hipModule_t Module;
- hipFunction_t Function;
- HIP_CHECK(hipModuleLoad(&Module, fileName));
- HIP_CHECK(hipModuleGetFunction(&Function, Module, kernel_name));
- hipCtxDestroy(context);
- return 0;
- }
Add Comment
Please, Sign In to add comment