import mlx.core as np
GPU_TRACE_FNAME = "metal.gputrace"
metal_available = np.metal.is_available()
if metal_available:
print(f"Metal Device Info:\n{np.metal.device_info()}")
else:
print("Sorry, Metal is not available.")
np.metal.start_capture(GPU_TRACE_FNAME)
x = np.array([0.0, 1.0, 2.0])
y = 1j * x
z = np.sqrt(y)
print(z)
np.metal.stop_capture()
< /code>
Aber das schlägt fehl: < /p>
% ./mlx_test_sqrt.py
Metal Device Info:
{'resource_limit': 499000, 'max_buffer_length': 8589934592, 'architecture': 'applegpu_g14g', 'memory_size': 17179869184, 'max_recommended_working_set_size': 11453251584, 'device_name': 'Apple M2'}
Traceback (most recent call last):
File ".../mlx_test_sqrt.py", line 22, in
np.metal.start_capture(GPU_TRACE_FNAME)
RuntimeError: [metal::start_capture] Failed to start: Capturing is not supported.
Irgendeine Idee, was meine nächsten Schritte sein sollten?
[code]mlx.core.sqrt()[/code] stürzt auf meinem MacBook Air M2 ab, wenn er auf ein komplexes Argument angewendet wird: [code]Python 3.11.11 (main, Dec 3 2024, 17:20:40) [Clang 16.0.0 (clang-1600.0.26.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import mlx.core as mx >>> x = mx.array([0.0, 1.0, 2.0]) >>> print(x) array([0, 1, 2], dtype=float32) >>> y = mx.sqrt(x) >>> print(y) array([0, 1, 1.41421], dtype=float32) >>> w = 1j * x >>> print(w) array([0+0j, 0+1j, 0+2j], dtype=complex64) >>> z = mx.sqrt(w) >>> print(z) Traceback (most recent call last): File "", line 1, in RuntimeError: [metal::Device] Unable to load kernel v_Sqrtcomplex64complex64
>>> print(mx.metal.device_info()) {'resource_limit': 499000, 'max_buffer_length': 8589934592, 'architecture': 'applegpu_g14g', 'memory_size': 17179869184, 'max_recommended_working_set_size': 11453251584, 'device_name': 'Apple M2'} [/code] Ist das erwartet?[code]import mlx.core as np
GPU_TRACE_FNAME = "metal.gputrace"
metal_available = np.metal.is_available() if metal_available: print(f"Metal Device Info:\n{np.metal.device_info()}") else: print("Sorry, Metal is not available.")
np.metal.start_capture(GPU_TRACE_FNAME) x = np.array([0.0, 1.0, 2.0]) y = 1j * x z = np.sqrt(y) print(z) np.metal.stop_capture() < /code> Aber das schlägt fehl: < /p> % ./mlx_test_sqrt.py Metal Device Info: {'resource_limit': 499000, 'max_buffer_length': 8589934592, 'architecture': 'applegpu_g14g', 'memory_size': 17179869184, 'max_recommended_working_set_size': 11453251584, 'device_name': 'Apple M2'} Traceback (most recent call last): File ".../mlx_test_sqrt.py", line 22, in np.metal.start_capture(GPU_TRACE_FNAME) RuntimeError: [metal::start_capture] Failed to start: Capturing is not supported. [/code] Irgendeine Idee, was meine nächsten Schritte sein sollten?
mlx.core.sqrt() stürzt auf meinem MacBook Air M2 ab, wenn er auf ein komplexes Argument angewendet wird:
Python 3.11.11 (main, Dec 3 2024, 17:20:40) on darwin
Type help , copyright , credits or...
Jetzt habe ich Java 8 installiert. Bitte sehen Sie sich die Pfade an und sagen Sie mir, was mir fehlt. JNLP-Dateien können nicht mit dem Befehl javaws gestartet werden.
Macbook Air M1
% echo $PATH...
Ich habe ein Fenstersignal, das ich seine Fourier -Koeffizienten berechne, aber in der Ausgabe erhalte ich einen kleinen komplexen Wert wobei der Ausgang rein real ist. /> Es ist alles in Python...
Ich habe eine Elektronen -App mit IPC zwischen dem Hauptprozess und dem Renderer -Prozess. Dies ist kein Produktionsbau. Im Moment versuche ich nur etwas Einfaches zu tun: Zeigen Sie auf der Seite...
Ich verwende mlx.data, um einen Bilddatensatz zu laden, in dem jede Klasse durch einen separaten Ordner dargestellt wird. Meine Funktionsdateien_and_classes generiert eine Liste von Wörterbüchern,...