Skip to content

convert_from_keras_model with project_name set to nondefault value fails to build #624

Open
@jmitrevs

Description

@jmitrevs

Prerequisites

Please make sure to check off these prerequisites before submitting a bug report.

  • Test that the bug appears on the current version of the master branch. Make sure to include the commit hash of the commit you checked out. (62046d7)
  • Check that the issue hasn't already been reported, by checking the currently open issues.
  • If there are steps to reproduce the problem, make sure to write them down below.
  • If relevant, please include the hls4ml project files, which were created directly before and/or after the bug.

Quick summary

convert_from_keras_model with project_name set to nondefault value fails to build, because in build.tcl the variable ${mynewprojname} is not defined. I will look to fix this, so just adding issue to not forget.

Details

If I set project_name to a non_default value, e.g.:

hls_model = hls4ml.converters.convert_from_keras_model(model,
                                                       hls_config=config,
                                                       output_dir='model_1_copy/hls4ml_prj',
                                                       part='xcu250-figd2104-2L-e',
                                                       project_name="mynewmodel")

in the hls4ml-tutorial (part 1), the build strep produces:

Sourcing Tcl script 'build_prj.tcl'
can't read "mynewmodel": no such variable
    while executing
"open_project ${mynewmodel}_prj"
    invoked from within
"if {$opt(reset)} {
  open_project -reset ${mynewmodel}_prj
} else {
  open_project ${mynewmodel}_prj
}"
    (file "build_prj.tcl" line 151)
    invoked from within
"source build_prj.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel \#0 [list source $arg] "

Please add to the following sections to describe the bug as accurately as possible.

Steps to Reproduce

The description above describes the change to part 1 of the hls4ml-tutorial that is legal but causes the project to not build

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions