Skip to content

Commit ad1ec74

Browse files
committed
Update evaluator.py
1 parent 77e1093 commit ad1ec74

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/mlx_metal_kernel_opt/evaluator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,17 @@ def _extract_custom_attention_class(self, program_text: str) -> Optional[Any]:
152152
actual_program_text = program_text
153153

154154
# Create execution environment
155+
import math
156+
import numpy as np
157+
import time
158+
from typing import Optional, Tuple, Any
159+
155160
exec_globals = {
156161
"__builtins__": __builtins__,
157162
"mx": mx,
158163
"nn": nn,
159164
"np": np,
165+
"math": math,
160166
"time": time,
161167
"Optional": Optional,
162168
"Tuple": Tuple,

0 commit comments

Comments
 (0)