mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Print exceptions in eval_cpu/eval_gpu and abort (#1754)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
#include <variant>
|
||||
|
||||
#include "mlx/array.h"
|
||||
@@ -53,6 +54,9 @@ struct PrintFormatter {
|
||||
|
||||
PrintFormatter& get_global_formatter();
|
||||
|
||||
/** Print the exception and then abort. */
|
||||
void abort_with_exception(const std::exception& error);
|
||||
|
||||
/** Holds information about floating-point types. */
|
||||
struct finfo {
|
||||
explicit finfo(Dtype dtype);
|
||||
|
||||
Reference in New Issue
Block a user