Post

Replies

Boosts

Views

Activity

First execution of executable has a delay
I'm on Ventura 13.0 Whenever I compile a program (e.g. c++) and run it for the first time it has a delay. The subsequent runs don't have that delay. For example: fryderykkogl@Fryderyks-MacBook-Pro Step1 % g++ main.cxx fryderykkogl@Fryderyks-MacBook-Pro Step1 % time ./a.out ./a.out 0.00s user 0.00s system 1% cpu 0.321 total fryderykkogl@Fryderyks-MacBook-Pro Step1 % time ./a.out ./a.out 0.00s user 0.00s system 58% cpu 0.005 total Why is this happening and how can this delay be 'turned off'?
0
0
314
Nov ’22
Error when importing TensorFlow
I installed TensorFlow according to this link: https://developer.apple.com/metal/tensorflow-plugin/ Mac M1 Pro macOS Monterey 12.3 When I try to import tensorflow: import tensorflow I get the following error: RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd ImportError: numpy.core._multiarray_umath failed to import ImportError: numpy.core.umath failed to import Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/__init__.py", line 37, in <module>     from tensorflow.python.tools import module_util as _module_util   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/__init__.py", line 42, in <module>     from tensorflow.python import data   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/data/__init__.py", line 21, in <module>     from tensorflow.python.data import experimental   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/data/experimental/__init__.py", line 95, in <module>     from tensorflow.python.data.experimental import service   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/data/experimental/service/__init__.py", line 387, in <module>     from tensorflow.python.data.experimental.ops.data_service_ops import distribute   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/data/experimental/ops/data_service_ops.py", line 23, in <module>     from tensorflow.python.data.experimental.ops import compression_ops   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/data/experimental/ops/compression_ops.py", line 16, in <module>     from tensorflow.python.data.util import structure   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/data/util/structure.py", line 22, in <module>     from tensorflow.python.data.util import nest   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/data/util/nest.py", line 36, in <module>     from tensorflow.python.framework import sparse_tensor as _sparse_tensor   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/framework/sparse_tensor.py", line 24, in <module>     from tensorflow.python.framework import constant_op   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/framework/constant_op.py", line 25, in <module>     from tensorflow.python.eager import execute   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/eager/execute.py", line 23, in <module>     from tensorflow.python.framework import dtypes   File "/Users/fryderykkogl/miniforge3/lib/python3.9/site-packages/tensorflow/python/framework/dtypes.py", line 29, in <module>     _np_bfloat16 = _pywrap_bfloat16.TF_bfloat16_type() TypeError: Unable to convert function return value to a Python type! The signature was () -> handle Any ideas on what I can do? I couldn't find this error anywhere
9
1
10k
Mar ’22