Skip to content

Commit

Permalink
Rename --save-temps option to -save-temps. (#2294)
Browse files Browse the repository at this point in the history
* Rename --save-temps option to -save-temps.

Make the option match the clang++ option name. Having access to
both just causes confusion and crashed the compiler.

Signed-off-by: Eric Schweitz <[email protected]>

* Allow --save-temps as well since clang likes that spelling.

Signed-off-by: Eric Schweitz <[email protected]>

---------

Signed-off-by: Eric Schweitz <[email protected]>
  • Loading branch information
schweitzpgi authored Oct 18, 2024
1 parent 4fe3c4b commit 94f6ee5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/sphinx/using/extending/cudaq_ir.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Let's see the output of :code:`nvq++` in verbose mode. Consider a simple code li
.. code-block:: console
$ nvq++ simple.cpp -v --save-temps
$ nvq++ simple.cpp -v -save-temps
cudaq-quake --emit-llvm-file simple.cpp -o simple.qke
cudaq-opt --pass-pipeline=builtin.module(canonicalize,lambda-lifting,canonicalize,apply-op-specialization,kernel-execution,indirect-to-direct-calls,inline,func.func(quake-add-metadata),device-code-loader{use-quake=1},expand-measurements,func.func(lower-to-cfg),canonicalize,cse) simple.qke -o simple.qke.LpsXpu
Expand All @@ -39,7 +39,7 @@ This workflow orchestration is represented in the figure below:
.. image:: ../../_static/nvqpp_workflow.png

We start by mapping CUDA-Q C++ kernel representations (structs, lambdas, and free functions)
to the Quake dialect. Since we added :code:`--save-temps`,
to the Quake dialect. Since we added :code:`-save-temps`,
we can look at the IR code that was produced. The base Quake file, :code:`simple.qke`, contains the following:

.. code-block:: console
Expand Down
4 changes: 2 additions & 2 deletions tools/nvqpp/nvq++.in
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function show_help {
--opt-pass <pass name>
Append a pass to the pass pipeline by specifying its name in the pass pipeline syntax, e.g. <dialect>.<opname>(passname).
--save-temps
-save-temps
Save temporary files.
-o=<obj>
Expand Down Expand Up @@ -520,7 +520,7 @@ while [ $# -ne 0 ]; do
CUDAQ_OPT_EXTRA_PASSES=$(add_pass_to_pipeline "${CUDAQ_OPT_EXTRA_PASSES}" "$2")
shift
;;
--save-temps)
-save-temps|--save-temps)
DELETE_TEMPS=false
;;
-h|--help)
Expand Down

0 comments on commit 94f6ee5

Please sign in to comment.