Re: Mir vs. Numpy: Reworked!

2020-12-10 Thread Igor Shirkalin via Digitalmars-d-announce
On Thursday, 10 December 2020 at 14:49:08 UTC, jmh530 wrote: On Thursday, 10 December 2020 at 11:07:06 UTC, Igor Shirkalin wrote: On Monday, 7 December 2020 at 13:17:47 UTC, jmh530 wrote: "no need to calculate inverse matrix" What? Since when? Since when highly optimized algorithms are

Re: Mir vs. Numpy: Reworked!

2020-12-10 Thread jmh530 via Digitalmars-d-announce
On Thursday, 10 December 2020 at 11:07:06 UTC, Igor Shirkalin wrote: On Monday, 7 December 2020 at 13:17:47 UTC, jmh530 wrote: "no need to calculate inverse matrix" What? Since when? Since when highly optimized algorithms are required. This does not mean that you should not know the

Re: Mir vs. Numpy: Reworked!

2020-12-10 Thread Igor Shirkalin via Digitalmars-d-announce
On Monday, 7 December 2020 at 13:07:23 UTC, 9il wrote: On Monday, 7 December 2020 at 12:28:39 UTC, data pulverizer wrote: On Monday, 7 December 2020 at 02:14:41 UTC, 9il wrote: I don't know. Tensors aren't so complex. The complex part is a design that allows Mir to construct and iterate

Re: Mir vs. Numpy: Reworked!

2020-12-10 Thread Igor Shirkalin via Digitalmars-d-announce
On Monday, 7 December 2020 at 13:54:26 UTC, Ola Fosheim Grostad wrote: On Monday, 7 December 2020 at 13:48:51 UTC, jmh530 wrote: On Monday, 7 December 2020 at 13:41:17 UTC, Ola Fosheim Grostad wrote: On Monday, 7 December 2020 at 13:17:47 UTC, jmh530 wrote: [snip] "no need to calculate

Re: Mir vs. Numpy: Reworked!

2020-12-10 Thread Igor Shirkalin via Digitalmars-d-announce
On Monday, 7 December 2020 at 13:41:17 UTC, Ola Fosheim Grostad wrote: On Monday, 7 December 2020 at 13:17:47 UTC, jmh530 wrote: On Monday, 7 December 2020 at 11:21:16 UTC, Igor Shirkalin wrote: [snip] Agreed. As a matter of fact the simplest convolutions of tensors are out of date. It is

Re: Mir vs. Numpy: Reworked!

2020-12-10 Thread Igor Shirkalin via Digitalmars-d-announce
On Monday, 7 December 2020 at 13:54:26 UTC, Ola Fosheim Grostad wrote: On Monday, 7 December 2020 at 13:48:51 UTC, jmh530 wrote: On Monday, 7 December 2020 at 13:41:17 UTC, Ola Fosheim Grostad wrote: On Monday, 7 December 2020 at 13:17:47 UTC, jmh530 wrote: [snip] "no need to calculate

Re: Mir vs. Numpy: Reworked!

2020-12-10 Thread Igor Shirkalin via Digitalmars-d-announce
On Monday, 7 December 2020 at 13:17:47 UTC, jmh530 wrote: On Monday, 7 December 2020 at 11:21:16 UTC, Igor Shirkalin wrote: [snip] Agreed. As a matter of fact the simplest convolutions of tensors are out of date. It is like there's no need to calculate inverse matrix. Mir is the usefull work

Re: Mir vs. Numpy: Reworked!

2020-12-07 Thread Ola Fosheim Grostad via Digitalmars-d-announce
On Monday, 7 December 2020 at 13:48:51 UTC, jmh530 wrote: On Monday, 7 December 2020 at 13:41:17 UTC, Ola Fosheim Grostad wrote: On Monday, 7 December 2020 at 13:17:47 UTC, jmh530 wrote: [snip] "no need to calculate inverse matrix" What? Since when? I dont know what he meant in this

Re: Mir vs. Numpy: Reworked!

2020-12-07 Thread jmh530 via Digitalmars-d-announce
On Monday, 7 December 2020 at 13:41:17 UTC, Ola Fosheim Grostad wrote: On Monday, 7 December 2020 at 13:17:47 UTC, jmh530 wrote: [snip] "no need to calculate inverse matrix" What? Since when? I dont know what he meant in this context, but a common technique in computer graphics is to build

Re: Mir vs. Numpy: Reworked!

2020-12-07 Thread Ola Fosheim Grostad via Digitalmars-d-announce
On Monday, 7 December 2020 at 13:17:47 UTC, jmh530 wrote: On Monday, 7 December 2020 at 11:21:16 UTC, Igor Shirkalin wrote: [snip] Agreed. As a matter of fact the simplest convolutions of tensors are out of date. It is like there's no need to calculate inverse matrix. Mir is the usefull work

Re: Mir vs. Numpy: Reworked!

2020-12-07 Thread jmh530 via Digitalmars-d-announce
On Monday, 7 December 2020 at 11:21:16 UTC, Igor Shirkalin wrote: [snip] Agreed. As a matter of fact the simplest convolutions of tensors are out of date. It is like there's no need to calculate inverse matrix. Mir is the usefull work for author, of course, and practically almost not used.

Re: Mir vs. Numpy: Reworked!

2020-12-07 Thread 9il via Digitalmars-d-announce
On Monday, 7 December 2020 at 12:28:39 UTC, data pulverizer wrote: On Monday, 7 December 2020 at 02:14:41 UTC, 9il wrote: I don't know. Tensors aren't so complex. The complex part is a design that allows Mir to construct and iterate various kinds of lazy tensors of any complexity and have

Re: Mir vs. Numpy: Reworked!

2020-12-07 Thread data pulverizer via Digitalmars-d-announce
On Monday, 7 December 2020 at 02:14:41 UTC, 9il wrote: I don't know. Tensors aren't so complex. The complex part is a design that allows Mir to construct and iterate various kinds of lazy tensors of any complexity and have quite a universal API, and all of these are boosted by the fact that

Re: Mir vs. Numpy: Reworked!

2020-12-07 Thread Igor Shirkalin via Digitalmars-d-announce
On Monday, 7 December 2020 at 02:14:41 UTC, 9il wrote: On Sunday, 6 December 2020 at 17:30:13 UTC, data pulverizer wrote: On Saturday, 5 December 2020 at 07:44:33 UTC, 9il wrote: sweep_ndslice uses (2*N - 1) arrays to index U, this allows LDC to unroll the loop. I don't know. Tensors

Re: Mir vs. Numpy: Reworked!

2020-12-06 Thread 9il via Digitalmars-d-announce
On Sunday, 6 December 2020 at 17:30:13 UTC, data pulverizer wrote: On Saturday, 5 December 2020 at 07:44:33 UTC, 9il wrote: sweep_ndslice uses (2*N - 1) arrays to index U, this allows LDC to unroll the loop. For example, for 2D case, withNeighboursSum [2] will store the pointer to the

Re: Mir vs. Numpy: Reworked!

2020-12-06 Thread data pulverizer via Digitalmars-d-announce
On Saturday, 5 December 2020 at 07:44:33 UTC, 9il wrote: sweep_ndslice uses (2*N - 1) arrays to index U, this allows LDC to unroll the loop. For example, for 2D case, withNeighboursSum [2] will store the pointer to the result, and the pointer at rows above and below. matrix:

Re: Mir vs. Numpy: Reworked!

2020-12-05 Thread Andre Pany via Digitalmars-d-announce
On Saturday, 5 December 2020 at 07:04:59 UTC, 9il wrote: On Thursday, 3 December 2020 at 16:50:39 UTC, Andre Pany wrote: On Thursday, 3 December 2020 at 16:27:59 UTC, 9il wrote: [...] Hi Ilya, Thanks a lot for sharing the update. I am currently working on porting a python package called

Re: Mir vs. Numpy: Reworked!

2020-12-05 Thread 9il via Digitalmars-d-announce
On Friday, 4 December 2020 at 20:26:17 UTC, data pulverizer wrote: On Friday, 4 December 2020 at 14:48:32 UTC, jmh530 wrote: It looks like all the `sweep_XXX` functions are only defined for contiguous slices, as that would be the default if define a Slice!(T, N). How the functions access

Re: Mir vs. Numpy: Reworked!

2020-12-04 Thread 9il via Digitalmars-d-announce
On Friday, 4 December 2020 at 03:48:15 UTC, Walter Bright wrote: On 12/3/2020 8:27 AM, 9il wrote: Since the first announcement [0] the original benchmark [1] has been boosted [2] with Mir-like implementations. This is really great! Can you write an article about it? Such would be really

Re: Mir vs. Numpy: Reworked!

2020-12-04 Thread 9il via Digitalmars-d-announce
On Friday, 4 December 2020 at 02:35:49 UTC, data pulverizer wrote: On Thursday, 3 December 2020 at 21:28:04 UTC, jmh530 wrote: Am I correct in assuming that the data in the NDSlice is also a single array? sweep_ndslice uses (2*N - 1) arrays to index U, this allows LDC to unroll the loop.

Re: Mir vs. Numpy: Reworked!

2020-12-04 Thread 9il via Digitalmars-d-announce
On Thursday, 3 December 2020 at 17:08:58 UTC, jmh530 wrote: On Thursday, 3 December 2020 at 16:27:59 UTC, 9il wrote: Looks good, but a few typos: Thanks!

Re: Mir vs. Numpy: Reworked!

2020-12-04 Thread 9il via Digitalmars-d-announce
On Thursday, 3 December 2020 at 16:50:39 UTC, Andre Pany wrote: On Thursday, 3 December 2020 at 16:27:59 UTC, 9il wrote: Hi all, Since the first announcement [0] the original benchmark [1] has been boosted [2] with Mir-like implementations. D+Mir: 1. is more abstract than NumPy 2.

Re: Mir vs. Numpy: Reworked!

2020-12-04 Thread jmh530 via Digitalmars-d-announce
On Friday, 4 December 2020 at 20:26:17 UTC, data pulverizer wrote: [snip] I see, looking at some of the code, field case is literally doing the indexing calculation right there. I guess ndslice is doing the same thing just with "Mir magic" an in the background? Still, ndslice is able to get

Re: Mir vs. Numpy: Reworked!

2020-12-04 Thread data pulverizer via Digitalmars-d-announce
On Friday, 4 December 2020 at 14:48:32 UTC, jmh530 wrote: It looks like all the `sweep_XXX` functions are only defined for contiguous slices, as that would be the default if define a Slice!(T, N). How the functions access the data is a big difference. If you compare the `sweep_field`

Re: Mir vs. Numpy: Reworked!

2020-12-04 Thread jmh530 via Digitalmars-d-announce
On Friday, 4 December 2020 at 02:35:49 UTC, data pulverizer wrote: [snip] NDSlice is even faster for this case - cool. Am I correct in assuming that the data in the NDSlice is also a single array? It looks like all the `sweep_XXX` functions are only defined for contiguous slices, as that

Re: Mir vs. Numpy: Reworked!

2020-12-03 Thread Walter Bright via Digitalmars-d-announce
On 12/3/2020 8:27 AM, 9il wrote: Since the first announcement [0] the original benchmark [1] has been boosted [2] with Mir-like implementations. This is really great! Can you write an article about it? Such would be really helpful in letting people know about it.

Re: Mir vs. Numpy: Reworked!

2020-12-03 Thread data pulverizer via Digitalmars-d-announce
On Thursday, 3 December 2020 at 21:28:04 UTC, jmh530 wrote: The document says: Slice: Python like. Uses D Slices and Strides for grouping (Red-Black). Naive: one for-loop for each dimension. Matrix-Access via multi-dimensional Array. Field: one for-loop. Matrix is flattened. Access

Re: Mir vs. Numpy: Reworked!

2020-12-03 Thread data pulverizer via Digitalmars-d-announce
On Thursday, 3 December 2020 at 21:28:04 UTC, jmh530 wrote: The document says: Slice: Python like. Uses D Slices and Strides for grouping (Red-Black). Naive: one for-loop for each dimension. Matrix-Access via multi-dimensional Array. Field: one for-loop. Matrix is flattened. Access

Re: Mir vs. Numpy: Reworked!

2020-12-03 Thread mw via Digitalmars-d-announce
On Thursday, 3 December 2020 at 21:28:04 UTC, jmh530 wrote: On Thursday, 3 December 2020 at 20:25:11 UTC, data pulverizer wrote: [snip] Very interesting work. What is the difference between Mir's field, slice, native and ndslice? [...] The document says: Slice: Python like. Uses D

Re: Mir vs. Numpy: Reworked!

2020-12-03 Thread jmh530 via Digitalmars-d-announce
On Thursday, 3 December 2020 at 20:25:11 UTC, data pulverizer wrote: [snip] Very interesting work. What is the difference between Mir's field, slice, native and ndslice? [...] The document says: Slice: Python like. Uses D Slices and Strides for grouping (Red-Black). Naive: one

Re: Mir vs. Numpy: Reworked!

2020-12-03 Thread data pulverizer via Digitalmars-d-announce
On Thursday, 3 December 2020 at 16:27:59 UTC, 9il wrote: Hi all, Since the first announcement [0] the original benchmark [1] has been boosted [2] with Mir-like implementations. ... [SNIP] Kind regards, Ilya Very interesting work. What is the difference between Mir's field, slice, native

Re: Mir vs. Numpy: Reworked!

2020-12-03 Thread jmh530 via Digitalmars-d-announce
On Thursday, 3 December 2020 at 16:27:59 UTC, 9il wrote: Hi all, Since the first announcement [0] the original benchmark [1] has been boosted [2] with Mir-like implementations. D+Mir: 1. is more abstract than NumPy 2. requires less code for multidimensional algorithms 3. doesn't require

Re: Mir vs. Numpy: Reworked!

2020-12-03 Thread Andre Pany via Digitalmars-d-announce
On Thursday, 3 December 2020 at 16:27:59 UTC, 9il wrote: Hi all, Since the first announcement [0] the original benchmark [1] has been boosted [2] with Mir-like implementations. D+Mir: 1. is more abstract than NumPy 2. requires less code for multidimensional algorithms 3. doesn't require

Mir vs. Numpy: Reworked!

2020-12-03 Thread 9il via Digitalmars-d-announce
Hi all, Since the first announcement [0] the original benchmark [1] has been boosted [2] with Mir-like implementations. D+Mir: 1. is more abstract than NumPy 2. requires less code for multidimensional algorithms 3. doesn't require indexing 4. uses recursion across dimensions 5. a few

Re: MIR vs. Numpy

2020-11-20 Thread Tobias Schmidt via Digitalmars-d-announce
Thanks for all of your feedback! On Wednesday, 18 November 2020 at 13:14:37 UTC, jmh530 wrote: It's been a while since I've used numba, so I was a little confused on the numba 1 and numba 8 runs. The number was meant as the number of used threads in our runs. The prefix 'numba' is indicating

Re: MIR vs. Numpy

2020-11-18 Thread Max Haughton via Digitalmars-d-announce
On Wednesday, 18 November 2020 at 15:20:19 UTC, 9il wrote: On Wednesday, 18 November 2020 at 13:14:37 UTC, jmh530 wrote: On Wednesday, 18 November 2020 at 10:05:06 UTC, Tobias Schmidt wrote: It also looks like you are compiling on ldc with -mcpu=native --boundscheck=off. Why not -O as well?

Re: MIR vs. Numpy

2020-11-18 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 18 November 2020 at 15:20:19 UTC, 9il wrote: [snip] -O is added by DUB Ah, the -release-nobounds

Re: MIR vs. Numpy

2020-11-18 Thread 9il via Digitalmars-d-announce
On Wednesday, 18 November 2020 at 10:05:06 UTC, Tobias Schmidt wrote: Dear all, to compare MIR and Numpy in the HPC context, we implemented a multigrid solver in Python using Numpy and in D using Mir and perforemd some benchmarks with them. You can find our code and results here:

Re: MIR vs. Numpy

2020-11-18 Thread 9il via Digitalmars-d-announce
On Wednesday, 18 November 2020 at 13:14:37 UTC, jmh530 wrote: On Wednesday, 18 November 2020 at 10:05:06 UTC, Tobias Schmidt wrote: It also looks like you are compiling on ldc with -mcpu=native --boundscheck=off. Why not -O as well? -O is added by DUB

Re: MIR vs. Numpy

2020-11-18 Thread John Colvin via Digitalmars-d-announce
On Wednesday, 18 November 2020 at 13:01:42 UTC, Bastiaan Veelo wrote: On Wednesday, 18 November 2020 at 10:05:06 UTC, Tobias Schmidt wrote: Dear all, to compare MIR and Numpy in the HPC context, we implemented a multigrid solver in Python using Numpy and in D using Mir and perforemd some

Re: MIR vs. Numpy

2020-11-18 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 18 November 2020 at 10:05:06 UTC, Tobias Schmidt wrote: Dear all, to compare MIR and Numpy in the HPC context, we implemented a multigrid solver in Python using Numpy and in D using Mir and perforemd some benchmarks with them. You can find our code and results here:

Re: MIR vs. Numpy

2020-11-18 Thread Bastiaan Veelo via Digitalmars-d-announce
On Wednesday, 18 November 2020 at 10:05:06 UTC, Tobias Schmidt wrote: Dear all, to compare MIR and Numpy in the HPC context, we implemented a multigrid solver in Python using Numpy and in D using Mir and perforemd some benchmarks with them. You can find our code and results here:

MIR vs. Numpy

2020-11-18 Thread Tobias Schmidt via Digitalmars-d-announce
Dear all, to compare MIR and Numpy in the HPC context, we implemented a multigrid solver in Python using Numpy and in D using Mir and perforemd some benchmarks with them. You can find our code and results here: https://github.com/typohnebild/numpy-vs-mir Feedback is very welcome. Please