Skip to content
Open
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
3 changes: 2 additions & 1 deletion runtime/metal/DeviceCapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ std::optional<std::string> DeviceCapabilities::validationError() const {
return "recommended_working_set_exceeds_physical_memory";
}
if (!maxBufferLengthBytes) return "max_buffer_length_unavailable";
if (appleGpuFamily < kMinimumAppleGpuFamily) return "apple_gpu_family_9_required";
// HACK(initialed85): attempting to add support for M2 Max
if (appleGpuFamily < kMinimumAppleGpuFamily) return "apple_gpu_family_8_required";
if (maxThreadgroupMemoryBytes < 32 * 1024) {
return "threadgroup_memory_below_32_kib";
}
Expand Down
3 changes: 2 additions & 1 deletion runtime/metal/DeviceCapabilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ struct DeviceCapabilities {
uint32_t macosMinor = 0;
uint32_t macosPatch = 0;
// Highest supported MTLGPUFamilyAppleN.
static constexpr uint32_t kMinimumAppleGpuFamily = 9;
// HACK(initialed85): attempting to add support for M2 Max
static constexpr uint32_t kMinimumAppleGpuFamily = 8;
uint32_t appleGpuFamily = 0;
// IORegistry gpu-core-count; zero means unavailable. Kernel policy then
// assumes a large GPU when choosing parallelism.
Expand Down
3 changes: 2 additions & 1 deletion runtime/model/Runtime.mm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
// Fixed reserves the memory plan carries beside the planned arenas: Metal
// pipeline objects and encoder scratch, and the process's own runtime overhead.
constexpr uint64_t kPipelineReserveBytes = 256ULL << 20;
constexpr uint64_t kRuntimeOverheadReserveBytes = 512ULL << 20;
// HACK(initialed85): trying to add support for M2 Max
constexpr uint64_t kRuntimeOverheadReserveBytes = 768ULL << 20;

using metal::BufferStorage;
using metal::CommandGraph;
Expand Down