Skip to content

Commit

Permalink
sw: Add licenses to generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
suehtamacv committed Aug 30, 2023
1 parent 9cf678b commit 1463182
Show file tree
Hide file tree
Showing 43 changed files with 1,710 additions and 39 deletions.
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/dp-faxpy/data/data_1024.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const axpy_layer axpy_l = {
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/dp-faxpy/data/data_256.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const axpy_layer axpy_l = {
Expand Down
3 changes: 2 additions & 1 deletion sw/spatzBenchmarks/dp-faxpy/script/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def emit_header_file(layer_type: str, **kwargs):

file_path = pathlib.Path(__file__).parent.parent / "data"
emit_str = (
"// Copyright 2022 ETH Zurich and University of Bologna.\n"
"// Copyright 2023 ETH Zurich and University of Bologna.\n"
+ "// Licensed under the Apache License, Version 2.0, see LICENSE for details.\n"
+ "// SPDX-License-Identifier: Apache-2.0\n\n"
+ "// This file was generated automatically.\n\n"
)

if layer_type == "AXPY":
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/dp-fconv2d/data/data_32_32_7.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

fconv2d_layer fconv2d_l = {
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/dp-fconv2d/data/data_64_64_7.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

fconv2d_layer fconv2d_l = {
Expand Down
3 changes: 2 additions & 1 deletion sw/spatzBenchmarks/dp-fconv2d/script/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def emit_header_file(layer_type: str, **kwargs):

file_path = pathlib.Path(__file__).parent.parent / "data"
emit_str = (
"// Copyright 2022 ETH Zurich and University of Bologna.\n"
"// Copyright 2023 ETH Zurich and University of Bologna.\n"
+ "// Licensed under the Apache License, Version 2.0, see LICENSE for details.\n"
+ "// SPDX-License-Identifier: Apache-2.0\n\n"
+ "// This file was generated automatically.\n\n"
)

file = file_path / ("data_" + str(kwargs["R"]) + "_" + str(kwargs["C"]) + "_" + str(kwargs["F"]) + ".h")
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/dp-fdotp/data/data_128.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

dotp_layer dotp_l = {
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/dp-fdotp/data/data_4096.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

dotp_layer dotp_l = {
Expand Down
3 changes: 2 additions & 1 deletion sw/spatzBenchmarks/dp-fdotp/script/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def emit_header_file(layer_type: str, **kwargs):

file_path = pathlib.Path(__file__).parent.parent / "data"
emit_str = (
"// Copyright 2022 ETH Zurich and University of Bologna.\n"
"// Copyright 2023 ETH Zurich and University of Bologna.\n"
+ "// Licensed under the Apache License, Version 2.0, see LICENSE for details.\n"
+ "// SPDX-License-Identifier: Apache-2.0\n\n"
+ "// This file was generated automatically.\n\n"
)

file = file_path / ("data_" + str(kwargs["M"]) + ".h")
Expand Down
6 changes: 6 additions & 0 deletions sw/spatzBenchmarks/dp-fft/data/data_128_2.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

static uint32_t NFFT = 128;
static uint32_t NTWI = 192;

Expand Down
1,575 changes: 1,575 additions & 0 deletions sw/spatzBenchmarks/dp-fft/data/data_256_2.h

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion sw/spatzBenchmarks/dp-fft/script/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,18 @@ def main():
# Generate buffer for intermediate butterflies
buffer_dram = np.zeros(2 * NFFT)

# License
emit_str = (
"// Copyright 2023 ETH Zurich and University of Bologna.\n"
+ "// Licensed under the Apache License, Version 2.0, see LICENSE for details.\n"
+ "// SPDX-License-Identifier: Apache-2.0\n\n"
+ "// This file was generated automatically.\n\n"
)

# store_delta = [0, 2, 4, 6, 8, 10, 12, 14]
# bitrev = [0, 4, 2, 6, 1, 5, 3, 7]
# Create the file
emit_str = 'static uint32_t NFFT = {};\n'.format(NFFT)
emit_str += 'static uint32_t NFFT = {};\n'.format(NFFT)
emit_str += 'static uint32_t NTWI = {};\n\n'.format(N_TWID_V)

emit_str += 'static double samples_dram[{}]'.format(2 * NFFT) + ' __attribute__((section(".data"))) = {' + ', '.join(
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/dp-fmatmul/data/data_64_64_64.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 64,
Expand Down
3 changes: 2 additions & 1 deletion sw/spatzBenchmarks/dp-fmatmul/script/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def emit_header_file(layer_type: str, **kwargs):

file_path = pathlib.Path(__file__).parent.parent / "data"
emit_str = (
"// Copyright 2022 ETH Zurich and University of Bologna.\n"
"// Copyright 2023 ETH Zurich and University of Bologna.\n"
+ "// Licensed under the Apache License, Version 2.0, see LICENSE for details.\n"
+ "// SPDX-License-Identifier: Apache-2.0\n\n"
+ "// This file was generated automatically.\n\n"
)

if layer_type == "Conv2d":
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/hp-fmatmul/data/data_128_128_128.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 128,
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/hp-fmatmul/data/data_64_128_64.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 64,
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/hp-fmatmul/data/data_64_64_64.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 64,
Expand Down
3 changes: 2 additions & 1 deletion sw/spatzBenchmarks/hp-fmatmul/script/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ def emit_header_file(layer_type: str, **kwargs):

file_path = pathlib.Path(__file__).parent.parent / "data"
emit_str = (
"// Copyright 2022 ETH Zurich and University of Bologna.\n"
"// Copyright 2023 ETH Zurich and University of Bologna.\n"
+ "// Licensed under the Apache License, Version 2.0, see LICENSE for details.\n"
+ "// SPDX-License-Identifier: Apache-2.0\n\n"
+ "// This file was generated automatically.\n\n"
)

if layer_type == "Conv2d":
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/sdotp-bp-fmatmul/data/data_128_128_128.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 128,
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/sdotp-bp-fmatmul/data/data_128_256_128.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 128,
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/sdotp-bp-fmatmul/data/data_64_128_64.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 64,
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/sdotp-bp-fmatmul/data/data_64_64_64.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 64,
Expand Down
3 changes: 2 additions & 1 deletion sw/spatzBenchmarks/sdotp-bp-fmatmul/script/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ def emit_header_file(layer_type: str, **kwargs):

file_path = pathlib.Path(__file__).parent.parent / "data"
emit_str = (
"// Copyright 2022 ETH Zurich and University of Bologna.\n"
"// Copyright 2023 ETH Zurich and University of Bologna.\n"
+ "// Licensed under the Apache License, Version 2.0, see LICENSE for details.\n"
+ "// SPDX-License-Identifier: Apache-2.0\n\n"
+ "// This file was generated automatically.\n\n"
)

if layer_type == "Conv2d":
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/sdotp-hp-fmatmul/data/data_128_128_128.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 128,
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/sdotp-hp-fmatmul/data/data_64_128_64.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 64,
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/sdotp-hp-fmatmul/data/data_64_64_64.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 64,
Expand Down
3 changes: 2 additions & 1 deletion sw/spatzBenchmarks/sdotp-hp-fmatmul/script/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ def emit_header_file(layer_type: str, **kwargs):

file_path = pathlib.Path(__file__).parent.parent / "data"
emit_str = (
"// Copyright 2022 ETH Zurich and University of Bologna.\n"
"// Copyright 2023 ETH Zurich and University of Bologna.\n"
+ "// Licensed under the Apache License, Version 2.0, see LICENSE for details.\n"
+ "// SPDX-License-Identifier: Apache-2.0\n\n"
+ "// This file was generated automatically.\n\n"
)

if layer_type == "Conv2d":
Expand Down
6 changes: 6 additions & 0 deletions sw/spatzBenchmarks/sp-fft/data/data_256_2.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

static uint32_t NFFT = 256;
static uint32_t NTWI = 448;

Expand Down
6 changes: 6 additions & 0 deletions sw/spatzBenchmarks/sp-fft/data/data_512_2.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

static uint32_t NFFT = 512;
static uint32_t NTWI = 1024;

Expand Down
2 changes: 1 addition & 1 deletion sw/spatzBenchmarks/sp-fft/script/fft.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Parameters for an FFT

{
npoints: 512,
npoints: 256,
ncores: 2,
prec: 32
}
10 changes: 9 additions & 1 deletion sw/spatzBenchmarks/sp-fft/script/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,18 @@ def main():
# Generate buffer for intermediate butterflies
buffer_dram = np.zeros(2 * NFFT)

# License
emit_str = (
"// Copyright 2023 ETH Zurich and University of Bologna.\n"
+ "// Licensed under the Apache License, Version 2.0, see LICENSE for details.\n"
+ "// SPDX-License-Identifier: Apache-2.0\n\n"
+ "// This file was generated automatically.\n\n"
)

# store_delta = [0, 2, 4, 6, 8, 10, 12, 14]
# bitrev = [0, 4, 2, 6, 1, 5, 3, 7]
# Create the file
emit_str = 'static uint32_t NFFT = {};\n'.format(NFFT)
emit_str += 'static uint32_t NFFT = {};\n'.format(NFFT)
emit_str += 'static uint32_t NTWI = {};\n\n'.format(N_TWID_V)

emit_str += 'static float samples_dram[{}]'.format(2 * NFFT) + ' __attribute__((section(".data"))) = {' + ', '.join(
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/sp-fmatmul/data/data_64_128_64.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 64,
Expand Down
4 changes: 3 additions & 1 deletion sw/spatzBenchmarks/sp-fmatmul/data/data_64_64_64.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 64,
Expand Down
3 changes: 2 additions & 1 deletion sw/spatzBenchmarks/sp-fmatmul/script/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def emit_header_file(layer_type: str, **kwargs):

file_path = pathlib.Path(__file__).parent.parent / "data"
emit_str = (
"// Copyright 2022 ETH Zurich and University of Bologna.\n"
"// Copyright 2023 ETH Zurich and University of Bologna.\n"
+ "// Licensed under the Apache License, Version 2.0, see LICENSE for details.\n"
+ "// SPDX-License-Identifier: Apache-2.0\n\n"
+ "// This file was generated automatically.\n\n"
)

if layer_type == "Conv2d":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2022 ETH Zurich and University of Bologna.
// Copyright 2023 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// This file was generated automatically.

#include "layer.h"

const gemm_layer gemm_l = {.M = 128,
Expand Down
Loading

0 comments on commit 1463182

Please sign in to comment.