Skip to content

Commit

Permalink
[ GPU ] separate FP16-related functions to support ENABLE_FP16=FALSE
Browse files Browse the repository at this point in the history
- This commit resolves nnstreamer#2776
- This commit separate FP16-related functions from _cl.cpp file.
- Minor bug is fixed

Signed-off-by: Eunju Yang <[email protected]>
  • Loading branch information
EunjuYang committed Nov 4, 2024
1 parent b79273c commit 1849475
Show file tree
Hide file tree
Showing 16 changed files with 908 additions and 770 deletions.
4 changes: 2 additions & 2 deletions nntrainer/cl_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@ bool ClContext::clCreateKernel(std::string &kernel_string,
fs.seekg(0, std::ios::beg);

unsigned char *chunk = new unsigned char[binary_size];
fs.read((char*) chunk, binary_size);
fs.read((char *)chunk, binary_size);

result = program.CreateCLProgramWithBinary(
context_inst_.GetContext(), context_inst_.GetDeviceId(), binary_size,
chunk,
opencl::Program::DEFAULT_KERNEL_PATH + "/" + kernel_name +
"_kernel.bin",
"");
delete [] chunk;
delete[] chunk;
} else {
result =
program.CreateCLProgram(context_inst_.GetContext(),
Expand Down
Loading

0 comments on commit 1849475

Please sign in to comment.