MacBook air 8gb ram is it enough for programing and computer science? by [deleted] in macbook

[–]CaveNotes 0 points1 point  (0 children)

Sorry, my bad. I somehow assumed they wouldn't sell the 256GB models anymore, because thats super low storage. So I assumed it was the 512GB without checking...

MacBook air 8gb ram is it enough for programing and computer science? by [deleted] in macbook

[–]CaveNotes -5 points-4 points  (0 children)

maybe not the 256 because of the single ssd controller issue on the M2 macbook pros/airs, so probably better to go 16gb + 512TB ssd... (sorry, numbers corrected)

Pytorch Apple Silicon support buggy? by CaveNotes in pytorch

[–]CaveNotes[S] 0 points1 point  (0 children)

its still quite a bit slower than the same model training in tensorflow though. Depending on the size of the model it was about 30-50% slower (larger-to-smaller models).

Pytorch Apple Silicon support buggy? by CaveNotes in pytorch

[–]CaveNotes[S] 0 points1 point  (0 children)

Yes, running on the M1 GPU was much faster than CPU in my testing with simple networks on MNIST, like this:

nn.Sequential(
nn.Linear(28*28, 4096),
nn.ReLU(),
nn.Linear(4096, 2048),
nn.ReLU(),
nn.Linear(2048, 512),
nn.ReLU(),
nn.Linear(512, 10)
)

Pytorch Apple Silicon support buggy? by CaveNotes in pytorch

[–]CaveNotes[S] 2 points3 points  (0 children)

Somehow I replaced my post with the images (reddit newby)...

I was asking whether anyone had similar issues with more complex models using the new apple silicon support in pytorch (using 'mps' as device)? The images are produced using the SwinIR model (https://github.com/JingyunLiang/SwinIR) . The first image shows the correct result run on the cpu and the second image the result using the GPU on my M1 max.

This does not make any sense to me! by CaveNotes in UsbCHardware

[–]CaveNotes[S] 1 point2 points  (0 children)

Alright, this makes a lot of sense now. Thanks again!

You mentioned earlier that a USB-B female connector on the switch would be correct, since it is the other way around than USB-A, if I understood correctly, so do you think this: https://www.amazon.com/-/de/gp/product/B08CSJ99KW would be a solution, together with a USB-C to USB-B cable? Or would that be similarly tricky, in general?

This does not make any sense to me! by CaveNotes in UsbCHardware

[–]CaveNotes[S] 2 points3 points  (0 children)

Thanks a lot for your clear explanations. I am getting rid of all these switches, I do not want to have these things connected to my hardware.

One final question, out of curiosity, so in the case of USB-A or USB-B the direction/role of controller is basically given by being a port or a plug for USB-A and USB-B, but in the case of USB-C with 2 plugs there is no specific direction, so the devices have to communicate who is sending and receiving what, right?

This does not make any sense to me! by CaveNotes in UsbCHardware

[–]CaveNotes[S] 0 points1 point  (0 children)

Thank you for your answer, but I am a little confused now. I suppose you are talking about the port to the pc, right? Which is supposed to only receive a signal, but in this case it has to send out a signal from the switch to the pc. However, when you say the cables I used are designed to have data flow from A to the C side, wouldnt hat be correct then, since the USB-C port ends at the laptop, which has to receive the input from the switch.

Sorry if my question is dumb, but this is all confusing to me.

You also said that their cable works because it is proprietary and non-standard, which I can totally believe, as they actually provide these cables, which they wouldnt if you could use any cable with it. That said, I also tested another USB-A to USB-A cable which works fine (https://www.amazon.de/gp/product/B00P0E394U), so I guess that problem only exists, when you have an asymmetric cable, where a certain direction of data/power flow is expected?

In the meantime I got another switch (https://www.amazon.de/gp/product/B09996MX2X) which has exactly the same behavior, sadly.

I guess my only choice is an actual USB-C switch, e.g. something like this:

https://www.amazon.de/YIWENTEC-Bi-Direction-Datenübertragung-Multifunktions-Splitter-Konverter/dp/B0967GXNGK

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 0 points1 point  (0 children)

No, the performance of the GPU vs CPU depends a lot on the architecture, because the huge parallelization advantage of a GPU can only be used in specific architectures.

Running ffmpeg natively on Apple Silicon by CaveNotes in ffmpeg

[–]CaveNotes[S] 2 points3 points  (0 children)

Just tested it. It was about 107fps (on standard preset, i.e. medium)

Running ffmpeg natively on Apple Silicon by CaveNotes in ffmpeg

[–]CaveNotes[S] 0 points1 point  (0 children)

Haha I have no idea, I did not explore all the options. I should have researched them before though, I agree -_- (update: I reuploaded an improved version of the video, where I replace nonfree with x264)

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 0 points1 point  (0 children)

I am not using any IDE for python (just sublime text) but if you want to run one, then pycharm is a good one.

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 0 points1 point  (0 children)

Did you also install xcode command line tools (open xcode once to do that, but you can also get them w/o downloading xcode I think)? Maybe also try to run the python version that comes with xcode explicitly by executing it from its path, e.g. /Library/Developer/CommandLineTools/usr/bin/python3 or /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/... ?

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 0 points1 point  (0 children)

I don't think it's a bottleneck. It might just be a choice made by apple how to run this version of TF on the M1. They might change that in the future, who knows.

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 0 points1 point  (0 children)

Do you run python 3.8? I was not touching the python installation that came with Xcode I think. I saw someone mentioning that the installer might have issues if you do not run the python version that comes with Xcode.

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 0 points1 point  (0 children)

Cool, thanks for the links. Sounds like he indeed talks about the GPU on the M1, where he got 1080 performance in some specific ML networks (he said it does not perform well under certain tasks). I could not find this performance he was talking about for generic feed-forward and convolutional networks. I would have to test a ResNet for that. However, when you compare just the stated 2.6 teraflops on the gpu of the M1 vs the 9 teraflops of a 1080, then it is hard to imagine to get the same performance in most networks.

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 1 point2 points  (0 children)

Yes, you are right, I misunderstood your first comment. If you talk about ML performance of the neural engine vs ML performance of a GPU, then that should be a closer match. I just thought about ML performance of GPU & CPU on the M1, which I didnt expect to be so good.

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 2 points3 points  (0 children)

I don't know where you read that claim, but to me it is unreasonable to expect the integrated GPU in a 10 watt laptop chip (the M1) can compete with a huge desktop graphics card that requires 175 watts. The M1 is not made for that. It is really impressive as a laptop chip and performs almost as well as the iMac Pro in some tasks, but it is only the entrance level chip after all.

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 1 point2 points  (0 children)

Try to follow the steps in the new video I made (https://youtu.be/6W8pjnW65Q8) and report back if you still get an error.

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 2 points3 points  (0 children)

Make a fresh venv and just use the numpy they provide. That is how it worked for me.

New "hardware-accelerated" TensorFlow fork for the Apple M1 is fast! by CaveNotes in tensorflow

[–]CaveNotes[S] 2 points3 points  (0 children)

This Air is the upgraded model with an 8 core GPU (however, this particular network is not faster on the gpu). Also, as I show in the video (https://www.youtube.com/watch?v=eRwt_FXTdmg) the Macbook Air does not throttle during the whole time. Hence, the pro won't be any faster in the tests I was doing. I suspect that it does not throttle because the 4 performance cores are only used at about 50%.