mlx/mlx/backend/cpu/jit_compiler.h
Awni Hannun 1156c84e86
Refactor common into cpu specific and truly common (#1817)
* refactor

* fix extension example

* fix no-cpu
2025-02-03 15:58:02 -08:00

21 lines
484 B
C++

// Copyright © 2024 Apple Inc.
#pragma once
#include <filesystem>
namespace mlx::core {
class JitCompiler {
public:
// Build a shell command that compiles a source code file to a shared library.
static std::string build_command(
const std::filesystem::path& dir,
const std::string& source_file_name,
const std::string& shared_lib_name);
// Run a command and get its output.
static std::string exec(const std::string& cmd);
};
} // namespace mlx::core