Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linear algebra tuning for nfloat + cmpabs #2038

Merged
merged 3 commits into from
Jul 20, 2024

Conversation

fredrik-johansson
Copy link
Collaborator

@fredrik-johansson fredrik-johansson commented Jul 20, 2024

  • Implement gr_cmpabs properly for nfloat_complex, acf, acb
  • Tuned threshold values for nfloat and nfloat_complex linear solving

Speedup nfloat vs arf for solving $Ax = b$ using gr_mat_nonsingular_solve (uniform random entries):

prec \ n
           2     4     8    16    32    64   128   256   512  1024 
    64  1.570 2.264 3.115 2.882 3.455 1.780 1.679 1.563 1.478 1.354 
   128  1.496 2.046 2.719 2.702 3.169 1.789 1.643 1.498 1.396 1.262 
   192  1.542 2.191 3.191 3.668 3.466 2.375 1.903 1.638 1.456 1.326 
   256  1.426 1.981 3.292 3.370 3.000 2.186 1.796 1.585 1.365 1.274 
   320  1.472 1.824 2.366 2.398 2.061 1.832 1.704 1.445 1.304 1.218 
   384  1.394 1.803 2.317 2.362 2.013 1.849 1.692 1.455 1.301 1.224 
   448  1.326 1.737 2.251 2.295 2.095 1.907 1.805 1.514 1.332 1.219 
   512  1.455 1.708 2.169 2.347 2.095 1.972 1.835 1.504 1.325 1.233 
   576  1.423 1.720 2.210 2.301 2.031 1.898 1.661 1.413 1.267 1.185 
   640  1.327 1.487 1.600 1.731 1.709 1.797 1.728 1.382 1.250 1.171 
   768  1.326 1.434 1.672 1.645 1.791 1.871 1.718 1.404 1.275 1.183 
  1024  1.398 1.476 1.588 1.691 1.846 2.028 1.789 1.480 1.321 1.206 
  1536  1.308 1.444 1.468 1.544 1.718 1.835 1.714 1.436 1.287 1.175 
  2048  1.217 1.317 1.359 1.494 1.665 1.793 1.600 1.410 1.264 1.174 
  2560  1.202 1.282 1.388 1.525 1.735 1.927 1.680 1.469 1.299 1.195 
  3072  1.169 1.262 1.314 1.477 1.654 1.831 1.594 1.426 1.281 1.179 
  4096  1.145 1.223 1.280 1.423 1.607 1.780 1.543 1.391 1.260 1.178 

Speedup nfloat_complex vs acf:

           2     4     8    16    32    64   128   256   512  1024 
    64  1.806 2.333 2.259 2.074 1.899 1.713 1.627 1.641 1.540 1.304 
   128  1.601 2.141 2.183 2.345 2.040 1.874 1.806 1.684 1.472 1.313 
   192  1.901 2.143 3.296 3.693 3.077 2.944 2.777 2.102 1.642 1.580 
   256  1.678 1.990 2.608 3.152 2.714 2.657 2.568 2.178 1.623 1.502 
   320  1.555 1.731 2.429 2.694 2.566 2.641 2.702 2.191 1.634 1.495 
   384  1.622 1.740 2.170 2.414 2.354 2.451 2.638 1.792 1.701 1.498 
   448  1.533 1.734 2.331 2.577 2.436 2.688 2.887 2.407 1.852 1.612 
   512  1.570 1.776 2.033 2.288 2.252 2.533 2.863 2.382 1.857 1.595 
   576  1.504 1.757 2.399 2.375 2.360 2.520 2.525 2.024 1.737 1.526 
   640  1.365 1.446 1.604 1.753 1.956 2.229 2.460 1.997 1.720 1.507 
   768  1.392 1.492 1.800 1.797 2.023 2.333 2.383 1.963 1.687 1.501 
  1024  2.965 1.786 1.881 2.073 2.293 2.646 2.482 2.049 1.724 1.542 
  1536  2.283 1.770 1.832 1.990 2.240 2.418 2.281 1.921 1.674 1.541 
  2048  2.216 2.100 2.064 2.135 2.326 2.534 2.239 1.937 1.636 1.512 
  2560  1.877 2.003 1.906 2.062 2.291 2.544 2.319 2.013 1.750 1.557 
  3072  1.879 1.778 1.797 1.967 2.228 2.455 2.249 1.945 1.720 1.544 
  4096  1.401 1.464 1.597 1.790 2.067 2.327 2.542 2.268 2.013 1.802 

@fredrik-johansson fredrik-johansson merged commit 05340d2 into flintlib:main Jul 20, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant