Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into skottmckay/ThrowIfWeC…
Browse files Browse the repository at this point in the history
…antAllocateDueToSizeCalcFailure
  • Loading branch information
skottmckay committed Jan 2, 2024
2 parents b50ae78 + 3993d43 commit d6b9eef
Show file tree
Hide file tree
Showing 27 changed files with 384 additions and 93 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -51,7 +51,7 @@ jobs:
# If this step fails, then you should remove it and run the build manually (see below)
- if: ${{ matrix.language != 'cpp' }}
name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# Version range or exact version of Python to use, using SemVer's version range syntax. Reads from .python-version if unset.
python-version: "3.10"
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Upload SARIF file
if: always()
continue-on-error: true
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
# Path to SARIF file relative to the root of the repository
sarif_file: lintrunner.sarif
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8.x'
architecture: 'x64'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-c-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
rm -rf site/docs/api/c
mv build/doxygen/html _site/docs/api/c
- name: Upload new site
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-c-apidocs
path: _site
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-csharp-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore dependencies
Expand All @@ -51,7 +51,7 @@ jobs:
rm -rf _site/docs/api/csharp
mv csharp/ApiDocs/csharp _site/docs/api/csharp
- name: Upload docs artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-csharp-apidocs
path: _site
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-java-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
mkdir -p _site/docs/api
mv java/build/docs/javadoc _site/docs/api/java
- name: Upload new site
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-java-apidocs
path: _site
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-js-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
mkdir -p _site/docs/api
mv js/common/docs _site/docs/api/js
- name: Upload docs artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-node-apidocs
path: _site
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-objectivec-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
shell: bash

- name: Upload new site
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-objectivec-apidocs
path: ./_site
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-python-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
mkdir -p _site/docs/api/
mv build/docs/html _site/docs/api/python
- name: Upload docs artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-python-apidocs
path: _site
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: false
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11.x'
architecture: 'x64'
Expand Down
2 changes: 1 addition & 1 deletion js/web/lib/wasm/jsep/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ComputeContextImpl implements ComputeContext {
const heapU32 = module.HEAPU32;

// extract context data
let dataIndex = (contextDataOffset >> 2);
let dataIndex = (contextDataOffset >>> 2);
this.opKernelContext = heapU32[dataIndex++];
const inputCount = heapU32[dataIndex++];
this.outputCount = heapU32[dataIndex++];
Expand Down
17 changes: 13 additions & 4 deletions js/web/lib/wasm/jsep/webgpu/ops/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -588,30 +588,39 @@ const createIndicesHelper =

const impl = () => {
const impls = [];
if (!useUniform) {
impls.push(`const ${shape} = ${type.indices}(${shapeOrRank.join(',')});`);
impls.push(`const ${strides} = ${type.indices}(${ShapeUtil.computeStrides(shapeOrRank).join(',')});`);
}
let needShapeStrides = false;
if (implementationUsed.offsetToIndices) {
impls.push(offsetToIndicesImplementation);
needShapeStrides = true;
}
if (implementationUsed.indicesToOffset) {
impls.push(indicesToOffsetImplementation);
needShapeStrides = true;
}
if (implementationUsed.broadcastedIndicesToOffset) {
Object.values(broadcastedIndicesToOffsetImplementation).forEach(impl => impls.push(impl));
needShapeStrides = true;
}
if (implementationUsed.set) {
impls.push(setImplementation);
needShapeStrides = true;
}
if (implementationUsed.setByIndices) {
impls.push(setByIndicesImplementation);
needShapeStrides = true;
}
if (implementationUsed.get) {
impls.push(getImplementation);
needShapeStrides = true;
}
if (implementationUsed.getByIndices) {
impls.push(getByIndicesImplementation);
needShapeStrides = true;
}
if (!useUniform && needShapeStrides) {
impls.unshift(
`const ${shape} = ${type.indices}(${shapeOrRank.join(',')});`,
`const ${strides} = ${type.indices}(${ShapeUtil.computeStrides(shapeOrRank).join(',')});`);
}
return impls.join('\n');
};
Expand Down
Loading

0 comments on commit d6b9eef

Please sign in to comment.