CUDA 5.0 から 5.5 にアップグレードしたところ、assert() の問題により、すべての VS2012 CUDA プロジェクトのコンパイルが停止しました。問題を再現するために、VS 2012 で新しい CUDA 5.5 プロジェクトを作成し、プログラミング ガイドから直接コードを追加したところ、同じエラーが発生しました。
__global__ void testAssert(void)
{
int is_one = 1;
int should_be_one = 0;
// This will have no effect
assert(is_one);
// This will halt kernel execution
assert(should_be_one);
}
これにより、次のコンパイラ エラーが発生します。
kernel.cu(22): error : calling a __host__ function("_wassert") from a __global__ function("testAssert") is not allowed
私が行方不明であることは明らかですか?