<bdo id='AnXzW'></bdo><ul id='AnXzW'></ul>

<small id='AnXzW'></small><noframes id='AnXzW'>

  1. <tfoot id='AnXzW'></tfoot>
    <i id='AnXzW'><tr id='AnXzW'><dt id='AnXzW'><q id='AnXzW'><span id='AnXzW'><b id='AnXzW'><form id='AnXzW'><ins id='AnXzW'></ins><ul id='AnXzW'></ul><sub id='AnXzW'></sub></form><legend id='AnXzW'></legend><bdo id='AnXzW'><pre id='AnXzW'><center id='AnXzW'></center></pre></bdo></b><th id='AnXzW'></th></span></q></dt></tr></i><div id='AnXzW'><tfoot id='AnXzW'></tfoot><dl id='AnXzW'><fieldset id='AnXzW'></fieldset></dl></div>

    1. <legend id='AnXzW'><style id='AnXzW'><dir id='AnXzW'><q id='AnXzW'></q></dir></style></legend>

      编译包含动态并行性的代码失败

      时间:2023-09-26
      • <small id='x279E'></small><noframes id='x279E'>

        <tfoot id='x279E'></tfoot>
            <tbody id='x279E'></tbody>
          <i id='x279E'><tr id='x279E'><dt id='x279E'><q id='x279E'><span id='x279E'><b id='x279E'><form id='x279E'><ins id='x279E'></ins><ul id='x279E'></ul><sub id='x279E'></sub></form><legend id='x279E'></legend><bdo id='x279E'><pre id='x279E'><center id='x279E'></center></pre></bdo></b><th id='x279E'></th></span></q></dt></tr></i><div id='x279E'><tfoot id='x279E'></tfoot><dl id='x279E'><fieldset id='x279E'></fieldset></dl></div>
            • <bdo id='x279E'></bdo><ul id='x279E'></ul>

              <legend id='x279E'><style id='x279E'><dir id='x279E'><q id='x279E'></q></dir></style></legend>

                本文介绍了编译包含动态并行性的代码失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 CUDA 5.5 和计算能力为 3.5 的 NVDIA GeForce GTX 780 进行动态并行编程.我在内核函数中调用内核函数,但它给了我一个错误:

                I am doing dynamic parallelism programming using CUDA 5.5 and an NVDIA GeForce GTX 780 whose compute capability is 3.5. I am calling a kernel function inside a kernel function but it is giving me an error:

                错误:从 __global__ 函数("kernel_5") 调用 __global__ 函数("kernel_6") 只允许在 compute_35 或更高架构上使用

                error : calling a __global__ function("kernel_6") from a __global__ function("kernel_5") is only allowed on the compute_35 architecture or above

                我做错了什么?

                推荐答案

                你可以这样做

                nvcc -arch=sm_35 -rdc=true simple1.cu -o simple1 -lcudadevrt
                

                如果您有 2 个文件 simple1.cu 和 test.c,那么您可以执行以下操作.这称为单独编译.

                If you have 2 files simple1.cu and test.c then you can do something as below. This is called seperate compilation.

                nvcc -arch=sm_35 -dc simple1.cu 
                nvcc -arch=sm_35 -dlink simple1.o -o link.o -lcudadevrt
                g++ -c test.c 
                g++ link.o simple1.o test.o -o simple -L/usr/local/cuda/lib64/ -lcudart
                

                cuda 编程指南

                这篇关于编译包含动态并行性的代码失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:openMP 嵌套并行 for 循环与内部并行 for 下一篇:如何编辑和重新构建 GCC libstdc++ C++ 标准库源代码?

                相关文章

              • <i id='esEXZ'><tr id='esEXZ'><dt id='esEXZ'><q id='esEXZ'><span id='esEXZ'><b id='esEXZ'><form id='esEXZ'><ins id='esEXZ'></ins><ul id='esEXZ'></ul><sub id='esEXZ'></sub></form><legend id='esEXZ'></legend><bdo id='esEXZ'><pre id='esEXZ'><center id='esEXZ'></center></pre></bdo></b><th id='esEXZ'></th></span></q></dt></tr></i><div id='esEXZ'><tfoot id='esEXZ'></tfoot><dl id='esEXZ'><fieldset id='esEXZ'></fieldset></dl></div>

                <legend id='esEXZ'><style id='esEXZ'><dir id='esEXZ'><q id='esEXZ'></q></dir></style></legend>
              • <small id='esEXZ'></small><noframes id='esEXZ'>

                • <bdo id='esEXZ'></bdo><ul id='esEXZ'></ul>

                    <tfoot id='esEXZ'></tfoot>