mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-07 12:30:50 +08:00

* redesign for faster cpu/gpu synch * load + more async CPU * use command encoder API and move more ops to use it * make fence back-end generic + CPU only fence * faster build * fix async eval * fixes + handle temporaries * fix / improve cpu conv * remove unused status, fix siblings * fix extensions * fix * fix no cpu build * format * comments * fix perf regression, remove unecessary abort * fix events, task limit cpu * fix waiting * fix donation / temporaries in normalization
22 lines
386 B
C++
22 lines
386 B
C++
// Copyright © 2023-2024 Apple Inc.
|
|
|
|
#pragma once
|
|
|
|
#include <future>
|
|
#include <memory>
|
|
|
|
#include "mlx/array.h"
|
|
#include "mlx/stream.h"
|
|
|
|
namespace mlx::core::metal {
|
|
|
|
void new_stream(Stream stream);
|
|
|
|
std::unique_ptr<void, std::function<void(void*)>> new_scoped_memory_pool();
|
|
|
|
void eval(array& arr);
|
|
void finalize(Stream s);
|
|
void synchronize(Stream s);
|
|
|
|
} // namespace mlx::core::metal
|