Skip to content

Added helper script to call vcvarsall.bat found using vswhere.exe. - #1425

Closed
edgchen1 wants to merge 3 commits into
masterfrom
edgchen1/use_vswhere
Closed

Added helper script to call vcvarsall.bat found using vswhere.exe.#1425
edgchen1 wants to merge 3 commits into
masterfrom
edgchen1/use_vswhere

Conversation

@edgchen1

@edgchen1 edgchen1 commented Jul 17, 2019

Copy link
Copy Markdown
Contributor

Added helper script to call vcvarsall.bat found using vswhere.exe. Updated existing usages of vcvarsall.bat.

Description:
This change adds some helper scripts for calling VS2017's vcvarsall.bat and updates existing calls to vcvarsall.bat. The locating of vcvarsall.bat is delegated to vswhere.exe (https://github.com/Microsoft/vswhere), which seems like a robust way of finding it.

Motivation and Context

  1. Remove some hard-coded paths to Visual Studio installations. Make it easier for other tools to invoke vcvarsall.bat.
  2. build.amd64.1411.bat was assuming the existence of a VCINSTALLDIR variable to find vcvarsall.bat. That variable was not present in a non-VS command prompt.

@edgchen1
edgchen1 requested a review from a team as a code owner July 17, 2019 20:04
Comment thread tools/vs2017_vcvarsall.bat Outdated
@edgchen1 edgchen1 changed the title Added helper script to call vcvarsall.bat found using vswhere.exe. Up… Added helper script to call vcvarsall.bat found using vswhere.exe. Jul 23, 2019
@yuslepukhin yuslepukhin closed this Aug 6, 2019
@yuslepukhin
yuslepukhin deleted the edgchen1/use_vswhere branch August 6, 2019 17:02
@yuslepukhin
yuslepukhin restored the edgchen1/use_vswhere branch August 6, 2019 17:21
@yuslepukhin yuslepukhin reopened this Aug 6, 2019
@stale

stale Bot commented Jul 3, 2020

Copy link
Copy Markdown

This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@stale stale Bot added the wontfix label Jul 3, 2020
@stale

stale Bot commented Jul 11, 2020

Copy link
Copy Markdown

This issue has been automatically closed due to inactivity. Please reactivate if further support is needed.

@stale stale Bot closed this Jul 11, 2020
@edgchen1
edgchen1 deleted the edgchen1/use_vswhere branch December 2, 2020 22:48
yuslepukhin pushed a commit that referenced this pull request Mar 17, 2026
## Describe your changes

Fix cli argparse help format: tuple -> str. Now `olive -h` works
automatically.

```
➜ Olive git:(xiaoyu/cli) olive -h
usage: olive

positional arguments:
  {run,auto-opt,capture-onnx-graph,finetune,generate-adapter,convert-adapters,quantize,tune-session-params,configure-qualcomm-sdk,manage-aml-compute,shared-cache}
    run                 Run an olive workflow
    auto-opt            Automatically optimize the performance of the input model.
    capture-onnx-graph  Capture ONNX graph using PyTorch Exporter or Model Builder from the Huggingface model or
                        PyTorch model.
    finetune            Fine-tune a model on a dataset using peft. Huggingface training arguments can be provided
                        along with the defined options.
    generate-adapter    Generate ONNX model with adapters as inputs. Only accepts ONNX models.
    convert-adapters    Convert lora adapter weights to a file that will be consumed by ONNX models generated by
                        Olive ExtractedAdapters pass.
    quantize            Quantize the input model
    tune-session-params
                        Automatically tune the session parameters for a given onnx model. Currently, for onnx model
                        converted from huggingface model and used for generative tasks, user can simply provide the
                        --model onnx_model_path --hf_model_name hf_model_name --device device_type to get the tuned
                        session parameters.
    configure-qualcomm-sdk
                        Configure Qualcomm SDK for Olive
    manage-aml-compute  Create new compute in your AzureML workspace
    shared-cache        Shared cache model operations

options:
  -h, --help            show this help message and exit
```
## Checklist before requesting a review
- [ ] Add unit tests for this change.
- [ ] Make sure all tests can pass.
- [ ] Update documents if necessary.
- [ ] Lint and apply fixes to your code by running `lintrunner -a`
- [ ] Is this a user-facing change? If yes, give a description of this
change to be included in the release notes.
- [ ] Is this PR including examples changes? If yes, please remember to
update [example
documentation](https://github.com/microsoft/Olive/blob/main/docs/source/examples.md)
in a follow-up PR.

## (Optional) Issue link
microsoft/Olive#1405
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants