4 ms·
You have two matrices, with allocated memory A and B, that you want to multiply and store to allocated memory C, as efficiently as possible using 8 cores. How d
by newen 7y ago
You have two matrices, with allocated memory A and B, that you want to multiply and store to allocated memory C, as efficiently as possible using 8 cores. How do you do this without threads exactly?
- pjmlp 7y agoVector instructions or GPGPU.
- newen 7y agoAssume no GPU. Vector instructions will only use one core at a time.
- pjmlp 7y agoWe are in 2019, even low level microcontrollers have dumbed down GPUs. Plus I already answered your questions, not moving goal posts here.
- detaro 7y agoAnd will spend more time shuffling data through their horribly bottle-necked memory interfaces than the CPU would take handling the matrix operation, especially if the GPU is already used for graphics. Multi-core systems and tools that can use them are valuable and very much reality right now.
- pjmlp 7y agoYep, CUDA and Vulkan Compute are such a waste in HPC, thankfully ML research is doubling down on threads.
- newen 7y agoI wanted an efficient no threads solution to a very common problem of matrix multiplication using multiprocessor CPUs. You gave me nonsense answers like vector operations (uses only one CPU at a time) and GPUs (memory transfer bottleneck, need to copy arrays, significantly less RAM compared to CPU RAM, and GPUs make it a completely different game). So no, I'm not moving goalposts.
- pjmlp 7y agoYou did not define what efficient means. For example, a SIMD implementation will outperform a multithreaded implementation on a CPU without support for hardware threads. My nonsense answer just happens to be what HPC is moving into, and when HPC wants to scale it uses MPI coupled GPUs, not plain old threads.
- deleted 7y ago[deleted]
- ernst_klim 7y ago>You have two matrices, with allocated memory A and B, that you want to multiply and store to allocated memory C, as efficiently as possible If matrices are small, 1 core would be more efficient. If matrices are big, GPU would be more efficient.