Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Linker error when using device_vector::resize() #792

@eligao

Description

@eligao

I came into an issue when using device_vector on VS2013 and CUDA 7.5.18 on Windows 10.

The most simple way of reproducing this issue:

  • On VS2013, create a newCUDA 7.5 runtime project
  • replace everything in kernel.cu with:
#include <thrust/device_vector.h>
int main(void)
{
    thrust::device_vector<int> vec;
    vec.resize(1);
    return 0;
}
  • In the project properties, under CUDA C/C++, set Code Generation as compute_35,sm_35 and Generate Relocatable Device Code as -rdc=true
  • Compile the project, and we can get a linker error:
1>CudaDemo2.device-link.obj : error LNK2001: unresolved external symbol __fatbinwrap_66_tmpxft_00000888_00000000_17_cuda_device_runtime_compute_52_cpp1_ii_8b1a5d37
1>D:\foo\CudaDemo2\x64\Debug\CudaDemo2.exe : fatal error LNK1120: 1  unresolved externals

When all conditions below are met, the linker error occurs.

  1. use Generate Relocatable Device Code (it works well without -rdc=true)
  2. choose computing capability >=3.5 (I tried 3.5, 5.0 and 5.2 with no luck, but compute_30,sm_30 works well)
  3. invoke thrust::device_vector::resize() (not sure whether there are other functions with the same issue, but the similar function thrust::device_vector::reserve() works fine)

I tried with the lastest commit 3e6b4ff but with no luck.

Metadata

Metadata

Assignees

Labels

nvbugHas an associated internal NVIDIA NVBug.type: bug: functionalDoes not work as intended.unverifiedCannot be reproduced or confirmed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions