generate_ml_strategies - 2022.1 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2022-05-05
Version
2022.1 English

Generate ML strategies for a run

Syntax

generate_ml_strategies [‑jobs <arg>] [‑details] [‑force] [‑keep_launch_dir]
    [‑suggestions_filter <arg>] [‑quiet] [‑verbose] <runs>...

Usage

Name Description
[-jobs] Number of jobs Default: 1
[-details] Prints job details
[-force] Force to regenerate the ml strategies.
[-keep_launch_dir] Keep the launch directory and files for analysis
[-suggestions_filter] Filter for the internal call to write_qor_suggestion command Default: Category==Strategy
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<runs> List of runs to generate ML strategies for

Categories

Object, Run

Description

Generates ML Strategies for a completed implementation run. It is a two step process where the first step is to create the ML Strategy RQS files and the second step is to create the implementation runs and reference the RQS files.

ML Strategies are written to the directory <run>/MLStrategy. Once strategies have been generated, implementation runs that reference the strategy can be created.

In order to generate ML strategies, flow criteria must be met:
  • opt_design must be run with either Default or Explore directive.
  • place_design, phys_opt_design, and route_design must be run with the same directive and be either Default or Explore.
For project mode strategies, there are two provided implementation strategies that meet this criteria:
  • Implementation Defaults
  • Performance Explore

This command is intended for use in interactive mode where a user generates strategies from a completed implementation run. For script users, it is recommended to generate ML strategies as part of an implementation run as this is a more efficient method. See the example below.

Note: This command is not supported in non-project mode. Refer alternative examples in the Examples section.

ML Strategies are supported for Versal, Ultrascale+, and Ultrascale families.

Arguments

-quiet - (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.

-jobs <arg> - (Optional) The number of parallel jobs to run on the local host.

-details - (Optional) Print details on the jobs such as host, memory, and user id.

-force - (Optional) Allows previous ML Strategies to be overwritten.

-keep_launch_dir - (Optional) Preserves the run directory used to open the checkpoint and generate the ML strategies.

-suggestions_filter - (Optional) Filters the other QoR suggestions that are generated. It is recommended to keep APPLIED suggestions as these form part of the design that was evaluated to generate the strategies. This command can be used to add other GENERATED suggestions.
Note: For more complex filtering, it is recommended to open the design and write QoR suggestions from the Report > QoR Suggestions or Tcl natively using report_qor_suggestions and write_qor_suggestions command.

<runs> - (Required) The names of implementation runs to launch. One or more run names may be specified.

Examples

The following command create ML Strategy RQS files and reference the files in the new runs replicating how a user interacts with the IDE.
generate_ml_strategies [get_runs impl_1] -suggestions_filter { APPLIED || Category==Strategy}
    create_rqs_runs -reference_run [get_runs impl_1]
For the script based project users, the ML strategies can be generated by default using a Tcl hook or turning on the AUTO_RQS feature of the run. AUTO_RQS also update other QoR Suggestions.
  1. Add the following commands into the Tcl file.
    report_qor_suggestions
    write_qor_suggestions -strategy_dir ./MLStrategy -filter {APPLIED || Category == Strategy}
  2. Add the Tcl file to the post route Tcl hook.
    import_files -fileset utils_1 post_route.tcl
    set_property STEPS.ROUTE_DESIGN.TCL.POST [ get_files post_route.tcl -of [get_fileset utils_1] ] [get_runs impl_1]
  3. Execute the following command to create new runs.
    create_rqs_runs -reference_run [get_runs impl_1]
Note: It is not recommended to manually script the creation of the run. Vivado® recommends running 3 ML Strategies per design.
The following non-project command generate ML strategy suggestions and write them to an RQS file in ./MLStrategy directory .
report_qor_suggestions
write_qor_suggestions -strategy_dir ./MLStrategy -filter {APPLIED || Category == Strategy}
The following example shows the equivalent non-project based commands to reference the RQS strategies.
<insert after link design or open checkpoint>
read_qor_suggestions ./MLStrategy/<top>_routedSuggestionFile[1||2||3].rqs
opt_design -directive RQS
place_design -directive RQS
phys_opt_design -directive RQS
route_design -directive RQS