mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-12-22 14:24:22 +00:00
Fix some compilation errors
This commit is contained in:
@@ -25,7 +25,7 @@ cudaDeviceProp initializeCUDA() {
|
||||
return deviceProp;
|
||||
}
|
||||
|
||||
using namespace CUDANet::Backend;
|
||||
using namespace CUDANet::Backends;
|
||||
|
||||
void* CUDA::allocate(size_t bytes) {
|
||||
void* d_ptr = nullptr;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "activation_functions.cuh"
|
||||
#include "cuda_helper.cuh"
|
||||
|
||||
using namespace CUDANet;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "cuda_helper.cuh"
|
||||
#include "backend/cuda.cuh"
|
||||
#include "matmul.cuh"
|
||||
|
||||
using namespace CUDANet;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "kernels/matmul.cuh"
|
||||
#include "kernels/pool.cuh"
|
||||
|
||||
using namespace CUDANet::Backend;
|
||||
using namespace CUDANet::Backends;
|
||||
|
||||
void CUDA::relu(Tensor& tensor) {
|
||||
int gridSize = (tensor.numel() + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "backend/cuda.cuh"
|
||||
#include "kernels/matmul.cuh"
|
||||
|
||||
using namespace CUDANet::Backend;
|
||||
using namespace CUDANet::Backends;
|
||||
|
||||
void CUDA::print(const CUDANet::Tensor &input) {
|
||||
auto length = input.numel();
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
using namespace CUDANet::Layers;
|
||||
|
||||
Activation::Activation(CUDANet::Backend* backend, ActivationType activation, const CUDANet::Shape &shape)
|
||||
Activation::Activation(ActivationType activation, const CUDANet::Shape &shape, CUDANet::Backend* backend)
|
||||
: backend(backend), activationType(activation), shape(shape) {
|
||||
|
||||
if (shape.size() != 1) {
|
||||
throw std::runtime_error(std::format("Invalid shape. Expected [1], got {}", shape));
|
||||
throw InvalidShapeException("input", 1, shape.size());
|
||||
}
|
||||
|
||||
auto length = shape[0];
|
||||
|
||||
Reference in New Issue
Block a user