Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding workflow files for checking for Copyright headers. #38

Merged
merged 8 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/check-spdx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DEFAULT:
perform_check: yes # Perform check for all files
allowed_licenses:
- Apache-2.0
license_for_new_files: Apache-2.0 # license to be used when inserting a new copyright notice
new_notice_c: |+ # notice for new C, CPP, H, HPP and LD files
// SPDX-FileCopyrightText: (c) {years} Tenstorrent AI ULC
//
// SPDX-License-Identifier: {license}
new_notice_python: |+ # notice for new python files
# SPDX-FileCopyrightText: (c) {years} Tenstorrent AI ULC
#
# SPDX-License-Identifier: {license}
13 changes: 13 additions & 0 deletions .github/workflows/pull-request-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Pull request workflow

on:
workflow_dispatch:
workflow_call:
pull_request:
branches:
- main

jobs:
spdx:
uses: ./.github/workflows/spdx.yml
secrets: inherit
15 changes: 15 additions & 0 deletions .github/workflows/spdx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: spdx

on:
workflow_dispatch:
workflow_call:

jobs:
check-spdx-headers:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: enarx/spdx@master
with:
licenses: Apache-2.0
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/espressif/check-copyright/
rev: v1.0.3
hooks:
- id: check-copyright
args: ['--config', '.github/check-spdx.yaml']
4 changes: 4 additions & 0 deletions clean_all.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0

rm -rf build
rm -rf env/build
rm -rf third_party/tt-mlir/build
Expand Down
4 changes: 4 additions & 0 deletions env/create_venv.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0

if [[ -z "$TTFORGE_PYTHON_VERSION" ]]; then
echo "TTFORGE_PYTHON_VERSION environment variable is not set"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions old_docs/public/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0
set -u
source $PYTHON_ENV/bin/activate
pip install sphinx
Expand Down
3 changes: 3 additions & 0 deletions pybuda/pybuda/tools/autotune.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0

LOGFILE="autotune.log"

Expand Down
4 changes: 4 additions & 0 deletions pybuda/test/mlir/llama/utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0

from transformers import LlamaConfig, LlamaForCausalLM, LlamaTokenizer

import pybuda
Expand Down
4 changes: 4 additions & 0 deletions pybuda/test/mlir/mnist/training/mnist_linear_pybuda.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0

import torch
from torchvision import datasets, transforms
from torch.utils.tensorboard import SummaryWriter
Expand Down
4 changes: 4 additions & 0 deletions pybuda/test/mlir/mnist/training/mnist_linear_pytorch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0

import torch
from torchvision import datasets, transforms
from torch.utils.tensorboard import SummaryWriter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0
# Commands for running resnet basic block
#

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0
# Commands for running resnet bottleneck block
#

Expand Down
3 changes: 3 additions & 0 deletions pybuda/test/operators/eltwise_binary/test_command.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0
#
# Commands for running element-wise binary tests
#
Expand Down
3 changes: 3 additions & 0 deletions pybuda/test/operators/eltwise_unary/test_command.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0
#
# Commands for running element-wise unary tests
#
Expand Down
3 changes: 3 additions & 0 deletions pybuda/test/operators/matmul/test_command.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0
#
# Commands for running matmul tests
#
Expand Down
4 changes: 3 additions & 1 deletion pybuda/test/operators/reduce/test_command.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0
# Commands for running reduce tests
#

Expand Down
3 changes: 3 additions & 0 deletions pybuda/test/operators/tm/hstack_hslice/test_command.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0
#
# Commands for running hstack and hslice tests
#
Expand Down
4 changes: 3 additions & 1 deletion pybuda/test/operators/tm/reshape/test_command.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC

# SPDX-License-Identifier: Apache-2.0
# Commands for running reshape tests
#

Expand Down
Loading