Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Conversation

@swernli
Copy link
Collaborator

@swernli swernli commented Feb 17, 2021

This updates the QirRuntime pipeline to expect the qir-static.ll file to be generated at runtime instead of checked in, now that we can support cross-platform QIR generation properly.

This also updates the pipeline to use pwsh instead of powershell to get uniform behavior on Windows.

@swernli
Copy link
Collaborator Author

swernli commented Feb 17, 2021

@irinayat-MS Good suggestions! Adding the .ll to the artifacts and building such that it matches the configuration in the environment should be easy updates.

Write-Host "##vso[task.logissue type=error;]Failed to compile Q# project at '$qirStaticPath' into QIR."
return
}
Copy-Item -Path (Join-Path $qirStaticPath qir *.ll) -Destination (Split-Path $qirStaticPath -Parent)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we perhaps delete the currently generated QIR files that are in the /src/QirRuntime/test/QIR-static folder to avoid confusion?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be good to delete the one file that is now being generated (the second file was manually authored and covers functionality not supported by Q# but present in QIR spec)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does remove that file.

Copy link
Contributor

@IrinaYatsenko IrinaYatsenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks for doing this!


if ($Env:ENABLE_QIRRUNTIME -eq "true") {
Write-Host "##[info]Compile Q# Projects into QIR"
$qirStaticPath = Join-Path $PSScriptRoot test QIR-static qsharp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond the scope of this PR, but we may want to consider in the future making this rely on PowerShell cmdlet functions that wrap dotnet build and ensure that arguments such as build configuration and assembly versions are set from environment variables in a uniform way.

@swernli swernli merged commit 19039f6 into main Feb 17, 2021
@swernli swernli deleted the swernli/qir-llvm-xplat branch February 17, 2021 08:06
@swernli swernli mentioned this pull request Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants