copyright + ack

This commit is contained in:
Awni Hannun 2023-11-30 11:12:53 -08:00
parent a56e0888b8
commit 46a39e5b1f
211 changed files with 449 additions and 1 deletions

30
ACKNOWLEDGMENTS.md Normal file
View File

@ -0,0 +1,30 @@
MLX leverages several third-party software, listed here together with
their license copied verbatim.
## PocketFFT
Copyright (C) 2010-2018 Max-Planck-Society
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2023 ml-explore Copyright © 2023 Apple Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <iostream> #include <iostream>
#include "mlx/mlx.h" #include "mlx/mlx.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <iostream> #include <iostream>
#include "mlx/mlx.h" #include "mlx/mlx.h"
#include "time_utils.h" #include "time_utils.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include "mlx/mlx.h" #include "mlx/mlx.h"
#include "time_utils.h" #include "time_utils.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <chrono> #include <chrono>

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import numpy as np import numpy as np
from time_utils import time_fn from time_utils import time_fn

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import time import time

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import argparse import argparse
import mlx.core as mx import mlx.core as mx

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import numpy as np import numpy as np
import argparse import argparse
import mlx.core as mx import mlx.core as mx

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import argparse import argparse

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import argparse import argparse
import math import math
import os import os

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import argparse import argparse
import os import os
import time import time

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
#!/usr/bin/env python #!/usr/bin/env python
import argparse import argparse

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import math import math
import time import time

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import math import math
import time import time

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import math import math
import time import time

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import argparse import argparse
import mlx.core as mx import mlx.core as mx

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import time import time
import mlx.core as mx import mlx.core as mx

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <chrono> #include <chrono>
#include <cmath> #include <cmath>
#include <iostream> #include <iostream>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <chrono> #include <chrono>
#include <cmath> #include <cmath>
#include <iostream> #include <iostream>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <chrono> #include <chrono>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include "mlx/ops.h" #include "mlx/ops.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_stdlib> #include <metal_stdlib>
#include "mlx/backend/metal/kernels/bf16.h" #include "mlx/backend/metal/kernels/bf16.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <pybind11/pybind11.h> #include <pybind11/pybind11.h>
#include <pybind11/stl.h> #include <pybind11/stl.h>

View File

@ -1,2 +1,4 @@
# Copyright © 2023 Apple Inc.
import mlx.core as mx import mlx.core as mx
from .mlx_sample_extensions import * from .mlx_sample_extensions import *

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
from mlx import extension from mlx import extension
from setuptools import setup from setuptools import setup

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import mlx.core as mx import mlx.core as mx
import time import time

View File

@ -1,3 +1,5 @@
# Copyright © 2023 Apple Inc.
import mlx.core as mx import mlx.core as mx
import time import time

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cstdlib> #include <cstdlib>
#include <sstream> #include <sstream>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <cstdlib> #include <cstdlib>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <functional> #include <functional>
#include "mlx/array.h" #include "mlx/array.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <algorithm> #include <algorithm>
#include <cstdint> #include <cstdint>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include <simd/vector.h> #include <simd/vector.h>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include <vecLib/BNNS/bnns.h> #include <vecLib/BNNS/bnns.h>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include <cmath> #include <cmath>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include <simd/vector.h> #include <simd/vector.h>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include <limits> #include <limits>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <vecLib/BNNS/bnns.h> #include <vecLib/BNNS/bnns.h>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include "mlx/allocator.h" #include "mlx/allocator.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include "mlx/primitives.h" #include "mlx/primitives.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include <cmath> #include <cmath>
#include <sstream> #include <sstream>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include "mlx/allocator.h" #include "mlx/allocator.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#ifdef ACCELERATE_NEW_LAPACK #ifdef ACCELERATE_NEW_LAPACK

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <numeric> #include <numeric>
#include "mlx/allocator.h" #include "mlx/allocator.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include "mlx/array.h" #include "mlx/array.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cblas.h> #include <cblas.h>
#include "mlx/array.h" #include "mlx/array.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cmath> #include <cmath>
namespace mlx::core { namespace mlx::core {

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
namespace mlx::core { namespace mlx::core {

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <numeric> #include <numeric>
#include "mlx/3rdparty/pocketfft.h" #include "mlx/3rdparty/pocketfft.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <cmath> #include <cmath>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <utility> #include <utility>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <cmath> #include <cmath>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include <functional> #include <functional>
#include <limits> #include <limits>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include "mlx/backend/common/utils.h" #include "mlx/backend/common/utils.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include "mlx/backend/common/copy.h" #include "mlx/backend/common/copy.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <cassert> #include <cassert>
#include <cmath> #include <cmath>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <cmath> #include <cmath>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include "mlx/backend/common/threefry.h" #include "mlx/backend/common/threefry.h"
namespace mlx::core::random { namespace mlx::core::random {

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <cstdint> #include <cstdint>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include "mlx/allocator.h" #include "mlx/allocator.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <vector> #include <vector>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include "mlx/backend/metal/allocator.h" #include "mlx/backend/metal/allocator.h"
#include "mlx/backend/metal/metal.h" #include "mlx/backend/metal/metal.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <map> #include <map>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <sstream> #include <sstream>
#include "mlx/backend/metal/copy.h" #include "mlx/backend/metal/copy.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include "mlx/backend/common/copy.h" #include "mlx/backend/common/copy.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <dlfcn.h> #include <dlfcn.h>
#include <cstdlib> #include <cstdlib>
#include <filesystem> #include <filesystem>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <Metal/Metal.hpp> #include <Metal/Metal.hpp>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include "mlx/primitives.h" #include "mlx/primitives.h"
namespace mlx::core { namespace mlx::core {

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <numeric> #include <numeric>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include "mlx/backend/metal/kernels/bf16.h" #include "mlx/backend/metal/kernels/bf16.h"
template <typename T> template <typename T>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_atomic> #include <metal_atomic>
#include <metal_simdgroup> #include <metal_simdgroup>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <metal_atomic> #include <metal_atomic>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <metal_stdlib> #include <metal_stdlib>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include "mlx/backend/metal/kernels/bf16.h" #include "mlx/backend/metal/kernels/bf16.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_integer> #include <metal_integer>
#include <metal_math> #include <metal_math>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <metal_stdlib> #include <metal_stdlib>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_stdlib> #include <metal_stdlib>
#include "mlx/backend/metal/kernels/conv_params.h" #include "mlx/backend/metal/kernels/conv_params.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
template <int NDIM> template <int NDIM>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include "mlx/backend/metal/kernels/bf16.h" #include "mlx/backend/metal/kernels/bf16.h"
#include "mlx/backend/metal/kernels/utils.h" #include "mlx/backend/metal/kernels/utils.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#ifdef __METAL__ #ifdef __METAL__

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <metal_math> #include <metal_math>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include "mlx/backend/metal/kernels/bf16.h" #include "mlx/backend/metal/kernels/bf16.h"
#include "mlx/backend/metal/kernels/gemm/gemm.h" #include "mlx/backend/metal/kernels/gemm/gemm.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <metal_simdgroup> #include <metal_simdgroup>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <metal_simdgroup> #include <metal_simdgroup>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_stdlib> #include <metal_stdlib>
#include <metal_simdgroup> #include <metal_simdgroup>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_atomic> #include <metal_atomic>
#include <metal_texture> #include <metal_texture>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include "mlx/backend/metal/kernels/utils.h" #include "mlx/backend/metal/kernels/utils.h"
static constexpr constant uint32_t rotations[2][4] = { static constexpr constant uint32_t rotations[2][4] = {

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <metal_atomic> #include <metal_atomic>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_atomic> #include <metal_atomic>
#include <metal_simdgroup> #include <metal_simdgroup>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_math> #include <metal_math>
#include <metal_simdgroup> #include <metal_simdgroup>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_atomic> #include <metal_atomic>
#include <metal_common> #include <metal_common>
#include <metal_simdgroup> #include <metal_simdgroup>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_stdlib> #include <metal_stdlib>
#include "mlx/backend/metal/kernels/bf16.h" #include "mlx/backend/metal/kernels/bf16.h"

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#include <metal_integer> #include <metal_integer>
#include <metal_math> #include <metal_math>

View File

@ -1,3 +1,5 @@
// Copyright © 2023 Apple Inc.
#pragma once #pragma once
#include <metal_math> #include <metal_math>

Some files were not shown because too many files have changed in this diff Show More