Skip to content

Commit

Permalink
need license header on every file (pytorch#904)
Browse files Browse the repository at this point in the history
Add license header to files (pytorch#905)

* need license header on every file

* apparently the validator only reports the first violation it finds not all of them

* typeo

don't put the license on these files (pytorch#909)

add license to source files (pytorch#910)

this should be the final one (pytorch#911)
  • Loading branch information
byjlw authored and malfet committed Jul 17, 2024
1 parent b81f83e commit 6372e36
Show file tree
Hide file tree
Showing 19 changed files with 119 additions and 2 deletions.
2 changes: 1 addition & 1 deletion android/Torchchat/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
package org.pytorch.torchchat;

import androidx.test.ext.junit.runners.AndroidJUnit4;
Expand Down
7 changes: 7 additions & 0 deletions android/Torchchat/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--
Copyright (c) Meta Platforms, Inc. and affiliates.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
-->
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/

package org.pytorch.torchchat;

import org.junit.Test;
Expand Down
6 changes: 6 additions & 0 deletions android/Torchchat/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
Expand Down
6 changes: 6 additions & 0 deletions android/Torchchat/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

#Thu Apr 25 21:54:24 PDT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
Expand Down
6 changes: 6 additions & 0 deletions browser/browser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

import subprocess
import sys

Expand Down
6 changes: 6 additions & 0 deletions build/model_aoti.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

import torch
import torch.nn as nn
from torch._inductor.codecache import AsyncCompile
Expand Down
6 changes: 6 additions & 0 deletions build/model_et.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

import torch
import torch.nn as nn
from executorch.extension.pybindings import portable_lib as exec_lib
Expand Down
6 changes: 6 additions & 0 deletions export_et_util.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

import torch
from build.model import apply_rotary_emb, Attention

Expand Down
6 changes: 6 additions & 0 deletions quantization/qops.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

from typing import Optional

import torch
Expand Down
7 changes: 7 additions & 0 deletions runner/aoti.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

cmake_minimum_required(VERSION 3.24)
set(CMAKE_CXX_STANDARD 17)
IF(DEFINED ENV{TORCHCHAT_ROOT})
Expand Down
7 changes: 7 additions & 0 deletions runner/et.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

cmake_minimum_required(VERSION 3.24)
set(CMAKE_CXX_STANDARD 17)

Expand Down
8 changes: 8 additions & 0 deletions runner/run.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
Copyright (c) Meta Platforms, Inc. and affiliates.
All rights reserved.
This source code is licensed under the license found in the
LICENSE file in the root directory of this source tree.
*/

/* Inference for Llama-2 Transformer model in pure C++ */
#include <ctype.h>
#include <math.h>
Expand Down
6 changes: 6 additions & 0 deletions scripts/patch_triton.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

#!/usr/bin/env python3
# Delete me after triton is updated past https://github.com/triton-lang/triton/pull/3564

Expand Down
8 changes: 7 additions & 1 deletion scripts/prepare.sh
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
python3 scripts/download.py --repo-id $1 && python3 scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$1
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

python3 scripts/download.py --repo-id $1 && python3 scripts/convert_hf_checkpoint.py --checkpoint-dir checkpoints/$1
6 changes: 6 additions & 0 deletions scripts/test_flow.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

export MODEL_REPO=meta-llama/Llama-2-7b-chat-hf
rm -r checkpoints/$MODEL_REPO
python3 scripts/download.py --repo-id $MODEL_REPO
Expand Down
7 changes: 7 additions & 0 deletions scripts/updown.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.


import argparse
import os
import re
Expand Down
6 changes: 6 additions & 0 deletions utils/measure_time.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

from time import perf_counter
from typing import Optional

Expand Down

0 comments on commit 6372e36

Please sign in to comment.