Skip to content

Commit

Permalink
Bug fix in PTX loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Arsene Perard-Gayot committed Jun 26, 2017
1 parent 7861abc commit b0d9c50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cuda_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,9 @@ CUfunction CudaPlatform::load_kernel(DeviceId dev, const std::string& file, cons
}

std::string CudaPlatform::load_ptx(const std::string& filename) const {
std::string ptx_filename = filename + ".ptx";
std::ifstream src_file(ptx_filename);
std::ifstream src_file(filename);
if (!src_file.is_open())
error("Can't open PTX source file '%'", ptx_filename);
error("Can't open PTX source file '%'", filename);

return std::string(std::istreambuf_iterator<char>(src_file), (std::istreambuf_iterator<char>()));
}
Expand Down

0 comments on commit b0d9c50

Please sign in to comment.