NumPower / numpower

PHP extension for efficient scientific computing and array manipulation with GPU support
https://numpower.org
Other
176 stars 4 forks source link

[FEAT] Implement benchmark for CPU and GPU for linear algebra, arithmetic and initializer methods #57

Open henrique-borba opened 2 weeks ago

henrique-borba commented 2 weeks ago

Create the benchmark using phpbench (https://github.com/phpbench/phpbench), a solid and well-maintained tool.

jiyo4476 commented 2 weeks ago

I would like to contribute and work on this feature

henrique-borba commented 2 weeks ago

Nice @jiyo4476, thanks!

You can start with the initializers first so we can discuss a pattern and see what it looks like.

I was thinking of 3 matrices of sizes 10x100, 1000x500 and 10000x1000 and 3 vectors of size 100, 500, 1000 elements. This way we could also use it to identify algorithms that are potentially less performant with larger/smaller arrays.

When you want me to take a look, you can open the merge request. Ignore the merge request template guidelines as this issue does not apply.

jiyo4476 commented 1 week ago

Thank you! @henrique-borba

I created a new branch at https://github.com/jiyo4476/numpower and submitted a pull request. I added a composer.json file and installed dependencies with composer install.

Then I ran the benchmarks using ./vendor/bin/phpbench run benchmarks/initializers --report=aggregate

Currently, I only ran the tests with the compilation for CPU. I wanted to make sure I was adding the benchmarks correctly.

henrique-borba commented 1 week ago

I was focused on update 0.6.0 but now I'm going to prioritize your MR.

Thanks again @jiyo4476