Post

Replies

Boosts

Views

Activity

tf.random is broken since Monterey 12.1
It seems it didn't get much attention since it's lost in another thread. tf.random is broken since 12.1. import tensorflow as tf x = tf.random.uniform((10,)) y = tf.random.uniform((10,)) tf.print(x) tf.print(y) [0.178906798 0.8810848 0.384304762 ... 0.162458301 0.64780426 0.0123682022] [0.178906798 0.8810848 0.384304762 ... 0.162458301 0.64780426 0.0123682022] works fine on collab, worked on 12.0, It also works fine if I disable GPU with : tf.config.set_visible_devices([], 'GPU') WORKAROUND : g = tf.random.Generator.from_non_deterministic_state() x = g.uniform((10,)) y = g.uniform((10,))
7
1
3.2k
Dec ’21
what "Zero Metal services found" means ?
Friendly greetings ! I'm on a MacBook Air M1, using Xcode 13.1, Swift. The full source code is below, as a MaOS Console Application import Foundation import Metal import MetalKit import simd guard let device : MTLDevice = MTLCreateSystemDefaultDevice() else { fatalError("could not create metal default device") } let queue = device.makeCommandQueue() print("Hello, World!") The full output, running in debug from XCode is : 2021-10-29 06:00:16.567089+0200 FraCompute[71702:11572598] Metal API Validation Enabled 2021-10-29 06:00:16.621413+0200 FraCompute[71702:11572598] flock failed to lock list file (/var/folders/s7/7m1rt8kx3jq7c02mwclmnvf80000gn/C//com.apple.metal/16777235_322/functions.list): errno = 35 2021-10-29 06:00:16.628053+0200 FraCompute[71702:11572598] +[MTLIOAccelDevice registerDevices]: Zero Metal services found Hello, World! Program ended with exit code: 0 Running the sample "MacOS Game" default code (the one with the rotating cube) also give this "Zero Metal services found". What's a "metal service" anyway ? Googling for it obviously give me unrelated smithing service offer =^_^= It's not even "Metal Service not found" but, "I found Zero Metal Services", whatever that's supposed to mean ? is it "I didn't find any metal service" or is there a thing called "Zero Metal" ? I can query the metal device name and it get me "Apple M1". No problem, everything seems to work fine (so far). But what's the meaning of this message please ?
1
0
1.7k
Oct ’21
low-level graphic programming in C++
Requirements : I need to draw 2D lines, circles, boxes. Fast. That's it. I don't want to learn objC, Swift, Xcode. I'm using C++ and Jetbrains' CLion. OpenGL is deprecated (or soon to be) on Mac I don't even care about Apple (as you probably guessed), but the M1 processor is just too good. (and fanless <3) I'll be happy as long as it runs on my MacBook Air Text would be a useful feature but totally optional I won't even use sprites, or any kind of assets, sound, keyboard, mouse, IO, GUI. I need pure non-interactive visualisation of science-ish stuff. fast FPS, refreshing the visualization as fast as possible. Even if it's a pure framebuffer (an array of pixels), I'll manage. If it's a full fledged 3D accelerated graphic library (eg : openGL, Vulkan, Metal), it also works for me. "as long as it works" What kind of options are available to me with the aforementioned requirements ? use openGL anyway and cry when it will no longer works ? (meh) hack my way to Metal in C++ ? I'm fine if a suggested library isn't Object Oriented (eg : openGL) Vulkan ? I still need to open a graphic window context somehow SDL2 appears to have a some kind of Metal backend/port/whatever but all the exemples I find are in ObjC. honestly, my post feel like I'm crying for a documented c++ metal wrapper of some kind I suppose ? EDIT : I read mixed message and confusion on the Future of OpenGL on Mac. Mostly about "no longer supported" vs "Deprecated". Will OpenGL be removed and no longer works. Or it will works but won't be updated anymore ? (considering my requirements, an outdated version of OpenGL is perfectly fine to me) Thank you <3
4
0
5.3k
Oct ’21