Commit Graph
10 Commits
Author SHA1 Message Date
Gallo Alejandro a5bb8f3d9c Give a better message when out of memory in allocating SliceUnion 2022-09-12 19:39:38 +02:00
Gallo Alejandro 5678ac0d9c Fix AniaBug#2: Lifecycle of SelfSufficient slices was wrong (comments)
This commit shows how the lifecycle of as slice goes.
At some point, a rank gets a list of slices that needs
in the next iteration, at classifies them according
to the characteristics of every situation.

If for instance we are given a slice with
an abc tuple such that we find that this tuple
was given to our rank, then we know that
we have to create a SelfSufficient tuple.

What we do is that we find a blank slice in our
SliceUnion slices bucket. This buffer is blank
and safe to do everything we want with it.
Without cuda, we just need to point this
blank slice to the correct memory address
of the data, that we (the SliceUnion) own.
This is therefore the line

  blank.data = sources[from.source].data();

Of course, doing this in CUDA will mess everything,
as it was until now, since we are pointing to a Host
address. Sadly the way the casting fu is now implemented,
the typechecker did not get that one and I foolishly
forgot about this important bit.

After the creation of the slice comes at some point
in the life cycle the destruction, which we also
have to handle separately.
This is done every iteration in the

    void clearUnusedSlicesForNext(ABCTuple const& abc);

function. There, normally the SelfSufficient slice
would just forget about the pointer it points, slice.data,
since this point is part of the original data of the tensor
distributed in the SliceUnion. In the CUDA case however,
we gave the SelfSufficient slice a freePointer from our
SliceUnion's bucket of allocated freePointers in the GPU
(of which we have around 6 per SliceUnion type).
This pointer needs to be marked again free to use
by a slice in the future, so it has to go back to the bucket,
we can't afford to lose it.
2022-09-12 19:29:35 +02:00
Gallo Alejandro 5483325626 Fix AniaBug #1: cublasCreate after context setting 2022-09-12 19:17:52 +02:00
Gallo Alejandro 23ad87214f Uncomment everything in Equations, (to test see comments)
For testing, comment out everything
that has REORDER, MAYBE_CONJ and zeroing.
2022-09-12 19:13:45 +02:00
Gallo Alejandro 3d7702d501 Minimal changes in Equations 2022-09-12 19:10:14 +02:00
Gallo Alejandro c20b9e3bcb Add error checking in Blas.cxx 2022-09-12 19:07:48 +02:00
Gallo Alejandro da704ad820 Add convenience _FORMAT macro 2022-09-12 18:42:36 +02:00
Gallo Alejandro f1b2f37fe2 Check CUresult for mpi_data to device 2022-09-12 18:41:37 +02:00
Gallo Alejandro 1cd7bac187 Add macros to check CUerror and cublasStatus_t 2022-09-12 18:36:01 +02:00
Gallo Alejandro 68892d5dd8 Make bootstrap work from anywhere in the project 2022-09-12 18:35:30 +02:00