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

BLAS compatibility library #7

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
7cbf4de
BLAS library WIP
ChrisPattison Nov 14, 2021
2d72035
Empty matrix is a noop
ChrisPattison Nov 26, 2021
08461cc
put mpf_t in one place
ChrisPattison Nov 26, 2021
b531adc
PackFloat ToMpfr and ToGmp now const
ChrisPattison Nov 26, 2021
a59dd65
mpf_t/mpfr_t wrapper type
ChrisPattison Nov 26, 2021
d11fc10
unsigned long for precision
ChrisPattison Nov 26, 2021
0745071
overload of ApfpInterfaceType constructor with precision specified
ChrisPattison Nov 26, 2021
1da49df
ApfpInterfaceWrapper move semantics
ChrisPattison Nov 27, 2021
dd0db45
Fix memory leaks in BLAS library
ChrisPattison Nov 27, 2021
6ecea7a
Merge commit 'b3c3232369122bda9a551eb6777cc90d7721124f' into blas
ChrisPattison Dec 14, 2021
2dd8b21
Matrix Addition dummy
ChrisPattison Dec 14, 2021
e4165cb
mpf_t |-> mpf_ptr in PackedFloat
ChrisPattison Dec 14, 2021
7da55be
const ToGmp
ChrisPattison Dec 14, 2021
aeb9ce1
Hostlib takes mpf_ptr. Host transpose/add syrk
ChrisPattison Dec 14, 2021
4c499ae
Merge commit 'cd2be5046e33205e11bf54814d96263f8e66efed' into blas
ChrisPattison Dec 18, 2021
bfcacd9
MPFR BLAS interface
ChrisPattison Dec 19, 2021
b50c80e
Add unsigned long init and mul to wrapper header
ChrisPattison Dec 20, 2021
4947c85
Generate takes mpfr_ptr
ChrisPattison Dec 20, 2021
d96de48
BLAS syrk unit test
ChrisPattison Dec 20, 2021
4eb4881
Blas unit tests in separate executable
ChrisPattison Dec 21, 2021
c49e272
Search for kernel in current working directory
ChrisPattison Dec 22, 2021
bdd9f35
Throw an exception if we can't find the kernel
ChrisPattison Dec 26, 2021
adaba04
Guard against calling unitialized library
ChrisPattison Dec 26, 2021
13aa0e9
Add mechanism to get ApfpBlas error strings
ChrisPattison Dec 26, 2021
e2c32d8
Guard error code for ApfpInit in UnitTests
ChrisPattison Dec 26, 2021
41f75a8
More sophisticated kernel search routine
ChrisPattison Dec 26, 2021
4ab5d11
Setup/teardown test case
ChrisPattison Dec 26, 2021
3c37a15
Fix buffer size check on TransferToHost
ChrisPattison Dec 27, 2021
98f4721
CopyTransposeFromMatrix destination LDA
ChrisPattison Dec 27, 2021
ee113ba
Blas unit tests pass
ChrisPattison Dec 27, 2021
1d53578
Move interface type <gmp/mpfr> to Config.h
ChrisPattison Dec 28, 2021
c6a86a7
install kernels to lib
ChrisPattison Dec 28, 2021
4c22885
Compile under GMP interface type
ChrisPattison Dec 28, 2021
2aa28f5
Fix closeness check in BlasUnitTest for a=b=0
ChrisPattison Dec 28, 2021
47022fd
Use generators for SYRK test case
ChrisPattison Dec 28, 2021
8c8e2c2
Add config.h to install dirs
ChrisPattison Dec 28, 2021
b1449e1
Support 'T' argument in syrk
ChrisPattison Dec 28, 2021
572a4ca
Check upper/lower Syrk mode
ChrisPattison Dec 28, 2021
102c818
Fix MPFR wrapper argument order
ChrisPattison Dec 29, 2021
d22a4ee
Merge branch 'main' into blas
ChrisPattison Dec 29, 2021
b223108
Remove mystery character in CMakeLists.txt
ChrisPattison Dec 29, 2021
71a4cf8
Fix LD_LIBRARY_PATH search for FPGA kernel
ChrisPattison Dec 30, 2021
14274fc
Marginally more helpful error handling
ChrisPattison Dec 30, 2021
0b435be
GMP allows aliasing inputs
ChrisPattison Dec 30, 2021
1f43348
Install hw emu kernel
ChrisPattison Dec 30, 2021
9856042
Do SYRK addition on the FPGA
ChrisPattison Dec 30, 2021
1e8cffe
Move Apfp lib into namespace
ChrisPattison Dec 30, 2021
c1fdfa9
Make the interface type wrapping nicer
ChrisPattison Dec 30, 2021
0677b71
Rename ErrorDescription
ChrisPattison Dec 30, 2021
03859ee
Enum class Uplo/Trans
ChrisPattison Dec 30, 2021
b1a768d
Formatting because I keep forgetting
ChrisPattison Dec 30, 2021
78a4594
apfpHostlib naming convention
ChrisPattison Dec 31, 2021
119185c
Switch kernel to column major ordering
ChrisPattison Jan 3, 2022
8338d02
Remove extremely large volume simulation test cases
ChrisPattison Jan 3, 2022
1f8cd57
Merge branch 'main' into blas
ChrisPattison Jan 3, 2022
137d11d
ApfpIsInitialized |-> IsInitialized
ChrisPattison Jan 4, 2022
1cb5c90
Merge branch 'main' into col_major
ChrisPattison Jan 6, 2022
98434fc
Scale back directory search for kernel
ChrisPattison Jan 6, 2022
4e23918
Missing function renames
ChrisPattison Jan 6, 2022
7f1fa90
Add cwd to kernel search path
ChrisPattison Jan 6, 2022
6fd095e
Set INTERFACE_TYPE to SEMANTICS
ChrisPattison Jan 6, 2022
cacf283
Merge branch 'main' into blas
ChrisPattison Jan 6, 2022
9d1173c
BlasError is scoped enum
ChrisPattison Jan 6, 2022
9dbcb97
Merge branch 'col_major' into blas
ChrisPattison Jan 6, 2022
d0ab102
class Apfp -> Context
ChrisPattison Jan 6, 2022
155d0b8
Use RNDZ MPFR rounding mode everywhere
ChrisPattison Jan 6, 2022
55c9fe8
Throw KernelNotFoundException if APFP_KERNEL misset
ChrisPattison Jan 6, 2022
4e5c34d
Add comment about memory layout
ChrisPattison Jan 7, 2022
8b22b71
More descriptive SYRK unit tests
ChrisPattison Jan 8, 2022
ad5d63f
Add GEMM
ChrisPattison Jan 8, 2022
40a61a6
Missing syrk test case
ChrisPattison Jan 8, 2022
66ecc7e
Fix M and N in GEMM
ChrisPattison Jan 8, 2022
f9c7c3c
GEMM unit tests
ChrisPattison Jan 8, 2022
1685fd2
Go fast and break things - just not the unit tests!
ChrisPattison Jan 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
const ToGmp
  • Loading branch information
ChrisPattison committed Dec 14, 2021
commit 7da55beccae7d1668142f5717fa9994a28401a15
2 changes: 1 addition & 1 deletion include/PackedFloat.h
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ class PackedFloat {
return *this;
}

inline void ToGmp(mpf_ptr num) {
inline void ToGmp(mpf_ptr num) const {
const size_t gmp_limbs = (mpf_get_prec(num) + 8 * sizeof(mp_limb_t) - 1) / (8 * sizeof(mp_limb_t));
constexpr size_t kNumLimbs = kMantissaBytes / sizeof(Limb);
// GMP does not allow graceful rounding, so we cannot handle having insufficient bits in the target GMP number