Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit 4fc335a

Browse files
committed
Merge branch 'chore/dual-license'
2 parents d594a93 + 5e87c7d commit 4fc335a

11 files changed

+39
-123
lines changed

LICENSE-APACHE

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2021 Xavier Tao, Tommy van der Vorst & WONNX contributors
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

LICENSE renamed to LICENSE-MIT

File renamed without changes.

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -434,3 +434,27 @@ supported in the following cases:
434434
Constant folding is performed as part of shape inference, unless disabled (from the CLI pass `--no-fold-constants` to disable). This
435435
is done in order to support models that dynamically calculate shapes using operators such as `Shape`/`Squeeze`/`Unsqueeze` depending
436436
on dynamically set dimension parameters (e.g. batch size).
437+
438+
## License
439+
440+
Licensed under either of
441+
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
442+
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
443+
at your option.
444+
445+
Except for the following files:
446+
447+
* `data/models`:
448+
* `mobilenetv2-7.onnx`: [source](https://github.com/onnx/models/blob/main/vision/classification/mobilenet/model/mobilenetv2-7.onnx), Apache-2.0 license only.
449+
* `squeezenet-labels.txt`: [source](https://github.com/onnx/models/blob/main/vision/classification/synset.txt), Apache-2.0 license only.
450+
451+
* `data/images`:
452+
* `pelican.jpeg`: [source](https://en.wikipedia.org/wiki/Pelican#/media/File:Pelikan_Walvis_Bay.jpg), (C) Rui Ornelas, [CC-BY 2.0](https://creativecommons.org/licenses/by/2.0/).
453+
* `bald_eagle.jpeg`: [source](https://en.wikipedia.org/wiki/Bald_eagle#/media/File:Bald-Eagle-9114-cropped.jpg), (C) David R. Tribble, [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
454+
455+
456+
### Contribution
457+
458+
Unless you explicitly state otherwise, any contribution intentionally submitted
459+
for inclusion in the work by you shall be dual licensed as above, without any
460+
additional terms or conditions.

data/images/bald_eagle.jpeg

22.5 KB
Loading

data/images/italian_greyhound.jpeg

-563 KB
Binary file not shown.

data/images/pelican.jpeg

-86.7 KB
Loading

wonnx-py/tests/test_onnx_backend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: Apache-2.0
1+
# SPDX-License-Identifier: MIT OR Apache-2.0
22

33
import itertools
44
import os

wonnx-py/tests/test_specific_op.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: Apache-2.0
1+
# SPDX-License-Identifier: MIT OR Apache-2.0
22
import onnx.backend.test
33

44
pytest_plugins = ("onnx.backend.test.report",)

wonnx/src/compiler.rs

-37
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ lazy_static! {
8383
include_str!("../templates/matrix/transpose.wgsl"),
8484
)
8585
.unwrap();
86-
tera.add_raw_template(
87-
"matrix/lrn.wgsl",
88-
include_str!("../templates/matrix/lrn.wgsl"),
89-
)
90-
.unwrap();
9186
tera.add_raw_template(
9287
"pool/aggregate.wgsl",
9388
include_str!("../templates/pool/aggregate.wgsl"),
@@ -1326,38 +1321,6 @@ pub fn compile(
13261321
threads: (ceil(output_lengths[0], 256) as _, 1, 1),
13271322
}
13281323
}
1329-
"LRN" => {
1330-
// https://github.com/onnx/onnx/blob/main/docs/Operators.md#lrn
1331-
let alpha = node.get_attribute_value("alpha", Some(0.0001))?;
1332-
let beta = node.get_attribute_value("beta", Some(0.75))?;
1333-
let bias = node.get_attribute_value("bias", Some(1.0))?;
1334-
let size = node.get_attribute_value("size", Some(1))?;
1335-
1336-
context.insert("alpha", &alpha);
1337-
context.insert("beta", &beta);
1338-
context.insert("bias", &bias);
1339-
context.insert("size", &size);
1340-
1341-
let left_size = f64::floor((size - 1) as f64 / 2.0) as u32;
1342-
let right_size = f64::ceil((size - 1) as f64 / 2.0) as u32;
1343-
1344-
context.insert("left_size", &left_size);
1345-
context.insert("right_size", &right_size);
1346-
1347-
let (x_threads, workgroup_size_x) = workgroup_size(
1348-
output_lengths[0],
1349-
MAX_COMPUTE_WORKGROUPS_PER_DIMENSION,
1350-
MAX_WORKGROUP_SIZE_X,
1351-
)?;
1352-
context.insert("workgroup_size_x", &workgroup_size_x);
1353-
context.insert("i_chunks", &input_chunks);
1354-
1355-
NodeTemplate {
1356-
scalar_type: agreed_type(input_shapes, output_shapes)?,
1357-
template: "matrix/lrn.wgsl",
1358-
threads: (x_threads, 1, 1),
1359-
}
1360-
}
13611324
op => return Err(CompileError::UnimplementedOp(op.to_string())),
13621325
};
13631326

wonnx/templates/matrix/lrn.wgsl

-23
This file was deleted.

wonnx/tests/localresponsenormalization.rs

-61
This file was deleted.

0 commit comments

Comments
 (0)