4
1
2
计算物理
标题
2024-10-18 23:08:05
81

使用hipLaunchKernelGGL_device接口时 编译报错如下:请问应该如何修改:baoquan::baoquan:

attachmentId-image.png

全部评论(2)
只看楼主
网
网友50SQ8Y
楼主
2楼

#include <iostream>

#include "hip/hip_runtime.h"

#include "hip/hip_device_runtime_api.h"

//#include "anonymouslib_hip.h"

//#include <hipsparse.h>

#include "mmio.h"

#include <vector>

using namespace std;

__global__ void childKernel() {

printf("子核函数-----");

}

__global__ void parentKernel() {

printf("父核函数");

hipLaunchKernelGGL_device("childKernel",dim3(1, 1),dim3(64, 1),0,0);

}

int main(int argc, char ** argv)

{

parentKernel<<<128, 250>>>();

return 0;

}

您好 我改成了一个最简单代码 编译hipcc $ROCM_PATH/lib/libgalaxyhipdrt.a -fgpu-rdc test.cpp 出现报错:/tmp/test-f3d15e.o:在函数‘_GLOBAL__sub_I_test.cpp’中:

test.cpp:(.text.startup+0x21):对‘__hipdrt_enable’未定义的引用

dcc: error: linker command failed with exit code 1 (use -v to see invocation)
2024/10/26
P
panhuiwen
1楼
请提供下最小的编译示例
2024/10/24
没有更多内容了
--
楼主
Level.4
0 帖子
楼主热帖
暂无数据