SPB Git

spb/forge Public MIT

Forge — LLM training from scratch in pure C++20 + Metal on Apple Silicon.

C++ 61.2% C 23% Python 7.6% TeX 7.2% CMake 1.1%
4.4 KB · 121 lines cpp
Raw Blame History
1//-------------------------------------------------------------------------------------------------------------------------------------------------------------2//3// Metal/Metal.hpp4//5// Copyright 2020-2024 Apple Inc.6//7// Licensed under the Apache License, Version 2.0 (the "License");8// you may not use this file except in compliance with the License.9// You may obtain a copy of the License at10//11//     http://www.apache.org/licenses/LICENSE-2.012//13// Unless required by applicable law or agreed to in writing, software14// distributed under the License is distributed on an "AS IS" BASIS,15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.16// See the License for the specific language governing permissions and17// limitations under the License.18//19//-------------------------------------------------------------------------------------------------------------------------------------------------------------2021#pragma once2223//-------------------------------------------------------------------------------------------------------------------------------------------------------------2425#include "MTLAccelerationStructure.hpp"26#include "MTLAccelerationStructureCommandEncoder.hpp"27#include "MTLAccelerationStructureTypes.hpp"28#include "MTLAllocation.hpp"29#include "MTLArgument.hpp"30#include "MTLArgumentEncoder.hpp"31#include "MTLBinaryArchive.hpp"32#include "MTLBlitCommandEncoder.hpp"33#include "MTLBlitPass.hpp"34#include "MTLBuffer.hpp"35#include "MTLCaptureManager.hpp"36#include "MTLCaptureScope.hpp"37#include "MTLCommandBuffer.hpp"38#include "MTLCommandEncoder.hpp"39#include "MTLCommandQueue.hpp"40#include "MTLComputeCommandEncoder.hpp"41#include "MTLComputePass.hpp"42#include "MTLComputePipeline.hpp"43#include "MTLCounters.hpp"44#include "MTLDefines.hpp"45#include "MTLDepthStencil.hpp"46#include "MTLDevice.hpp"47#include "MTLDrawable.hpp"48#include "MTLDynamicLibrary.hpp"49#include "MTLEvent.hpp"50#include "MTLFence.hpp"51#include "MTLFunctionConstantValues.hpp"52#include "MTLFunctionDescriptor.hpp"53#include "MTLFunctionHandle.hpp"54#include "MTLFunctionLog.hpp"55#include "MTLFunctionStitching.hpp"56#include "MTLHeaderBridge.hpp"57#include "MTLHeap.hpp"58#include "MTLIndirectCommandBuffer.hpp"59#include "MTLIndirectCommandEncoder.hpp"60#include "MTLIntersectionFunctionTable.hpp"61#include "MTLIOCommandBuffer.hpp"62#include "MTLIOCommandQueue.hpp"63#include "MTLIOCompressor.hpp"64#include "MTLLibrary.hpp"65#include "MTLLinkedFunctions.hpp"66#include "MTLLogState.hpp"67#include "MTLParallelRenderCommandEncoder.hpp"68#include "MTLPipeline.hpp"69#include "MTLPixelFormat.hpp"70#include "MTLPrivate.hpp"71#include "MTLRasterizationRate.hpp"72#include "MTLRenderCommandEncoder.hpp"73#include "MTLRenderPass.hpp"74#include "MTLRenderPipeline.hpp"75#include "MTLResidencySet.hpp"76#include "MTLResource.hpp"77#include "MTLResourceStateCommandEncoder.hpp"78#include "MTLResourceStatePass.hpp"79#include "MTLSampler.hpp"80#include "MTLStageInputOutputDescriptor.hpp"81#include "MTLTexture.hpp"82#include "MTLTypes.hpp"83#include "MTLVertexDescriptor.hpp"84#include "MTLVisibleFunctionTable.hpp"85#include "MTLVersion.hpp"86#include "MTLTensor.hpp"87#include "MTLResourceViewPool.hpp"88#include "MTLTextureViewPool.hpp"89#include "MTLDataType.hpp"90#include "MTL4ArgumentTable.hpp"91#include "MTL4BinaryFunction.hpp"92#include "MTL4CommandAllocator.hpp"93#include "MTL4CommandBuffer.hpp"94#include "MTL4CommandEncoder.hpp"95#include "MTL4CommandQueue.hpp"96#include "MTL4Counters.hpp"97#include "MTL4RenderPass.hpp"98#include "MTL4RenderCommandEncoder.hpp"99#include "MTL4ComputeCommandEncoder.hpp"100#include "MTL4MachineLearningCommandEncoder.hpp"101#include "MTL4Compiler.hpp"102#include "MTL4CompilerTask.hpp"103#include "MTL4LibraryDescriptor.hpp"104#include "MTL4FunctionDescriptor.hpp"105#include "MTL4LibraryFunctionDescriptor.hpp"106#include "MTL4SpecializedFunctionDescriptor.hpp"107#include "MTL4StitchedFunctionDescriptor.hpp"108#include "MTL4PipelineState.hpp"109#include "MTL4ComputePipeline.hpp"110#include "MTL4RenderPipeline.hpp"111#include "MTL4MachineLearningPipeline.hpp"112#include "MTL4TileRenderPipeline.hpp"113#include "MTL4MeshRenderPipeline.hpp"114#include "MTL4PipelineDataSetSerializer.hpp"115#include "MTL4Archive.hpp"116#include "MTL4CommitFeedback.hpp"117#include "MTL4BinaryFunctionDescriptor.hpp"118#include "MTL4LinkingDescriptor.hpp"119120//-------------------------------------------------------------------------------------------------------------------------------------------------------------121