Fix associate code object symbols with host allocation bug (#1799)
The current implementation skips this procedure for a given device object when a global symbol is found in the cache. This is incorrect: - There could be other undefined globals that have not been previously encountered further down the list - If a symbol is found in the cache, it doesn't need to be pinned again but it still need to be defined for the current executable Added special case for the printf buffer symbol (already pinned by HCC) The bug was exposed by running printf on different GPUs.
这个提交包含在:
1 父节点
8fc262ef23
当前提交
6613a37b3b
3 个文件已更改
+50
-21
没有与搜索条件相匹配的文件
@@ -30,7 +30,12 @@ THE SOFTWARE.
|
||||
__global__ void run_printf() { printf("Hello World\n"); }
|
||||
|
||||
int main() {
|
||||
hipLaunchKernelGGL(HIP_KERNEL_NAME(run_printf), dim3(1), dim3(1), 0, 0);
|
||||
hipDeviceSynchronize();
|
||||
int device_count = 0;
|
||||
hipGetDeviceCount(&device_count);
|
||||
for (int i = 0; i < device_count; ++i) {
|
||||
hipSetDevice(i);
|
||||
hipLaunchKernelGGL(HIP_KERNEL_NAME(run_printf), dim3(1), dim3(1), 0, 0);
|
||||
hipDeviceSynchronize();
|
||||
}
|
||||
passed();
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户