In trt plugin' consturctor, cuModuleLoadData occasionally fails because of illegal address.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 13.4k
- Forks
- 2.4k
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
In tensorrt plugin's consturctor, here is the code as follow:
FaPlugin::FaPlugin(std::string asset_prefix ):asset_prefix_(asset_prefix)
{
setPluginNamespace(kTfTrtPluginNamespace);
cudaGetDevice(&device_id_);
cudaDeviceSynchronize();
auto ptx = read_ptx(ptx_path);
CUmodule mod = nullptr;
CUresult code = cuModuleLoadData(&mod, ptx.c_str());
if (code != CUDA_SUCCESS)
{
const char *str;
cuGetErrorString(code, &str);
char err[1024] = {0};
strcat(err, str);
std::cerr << "Error Code: " << code
<< "\n\tMessage: " << err
<< "\n\tAt " << file << ":" << line << std::endl;
}
}
}
Occasionally, cuModuleLoadData returns illegal address error, but most of the time it runs normally.
I want to ask why this occurs occasionally, and how to solve it, should i init some context or something else before
the function cuModuleLoadData ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is identified. Start by inspecting the FaPlugin constructor around read_ptx, cudaGetDevice, cudaDeviceSynchronize, and cuModuleLoadData, then investigate the intermittent illegal-address result and define a reproducible initialization or loading sequence that prevents it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100