Skip to content
Snippets Groups Projects

Matmul rework

Merged Houssem ROUIS requested to merge (removed):matmul_rework into dev
4 files
+ 122
70
Compare changes
  • Side-by-side
  • Inline
Files
4
  • e2a71d4f
    Rework MatMul kernel · e2a71d4f
    Maxence Naud authored
    - [function] computation of input dimensions now happens in 'MatMulImpl_cpu::forward()'. It handle indexes and sends the right pointers to its computation kernel
    - [function] 'getCPUPtr()' new parameter: offset
    - [function] reduce MatMul kernel function to simple matrices multiplication
@@ -15,9 +15,9 @@
@@ -15,9 +15,9 @@
#include "aidge/data/Tensor.hpp"
#include "aidge/data/Tensor.hpp"
namespace Aidge {
namespace Aidge {
inline void *getCPUPtr(std::shared_ptr<Aidge::Data> const &data) {
inline void *getCPUPtr(std::shared_ptr<Aidge::Data> const &data, const std::size_t offset = 0) {
const auto tensor = std::static_pointer_cast<Tensor>(data);
const auto tensor = std::static_pointer_cast<Tensor>(data);
return tensor->getImpl()->hostPtr(tensor->getImplOffset());
return tensor->getImpl()->hostPtr(tensor->getImplOffset() + offset);
}
}
} // namespace Aidge
} // namespace Aidge
Loading