Skip to content

Commit

Permalink
Merge pull request #10 from ReconfigureIO/fix/kernel-name-workaround
Browse files Browse the repository at this point in the history
Add workaround for Vivado 2018.2 kernel name change
  • Loading branch information
Max Siegieda authored Dec 12, 2018
2 parents f2fc791 + 01cc3ee commit 10ac302
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions xcl/xcl.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ This needs to be released when done.
*/
func (program *Program) GetKernel(kernelName string) *Kernel {
// Vivado 2018.2 started imposing a limit on kernel name length. We're
// working around this by renaming the kernel from
// "reconfigure_io_sdaccel_builder_stub_0_1" which was used with Vivado
// 2017.1 to "rio_sda_stub_0_1".
if kernelName == "reconfigure_io_sdaccel_builder_stub_0_1" {
kernelName = "rio_sda_stub_0_1"
}

s := C.CString(kernelName)
k := C.xcl_get_kernel(C.cl_program(program.program), s)
C.free(unsafe.Pointer(s))
Expand Down

0 comments on commit 10ac302

Please sign in to comment.