Add files via upload

This commit is contained in:
David Rotermund 2023-01-29 00:59:05 +01:00 committed by GitHub
parent dcee82fca6
commit 3622b91591
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 95 additions and 7 deletions

View file

@ -712,3 +712,25 @@ bool HDynamicCNNManyIP::gpu_update(
return true;
};
void HDynamicCNNManyIP::gpu_occupancy_export(
size_t dim_x,
size_t dim_y,
size_t number_of_pattern,
size_t h_dim,
int64_t setting_memory_addr,
size_t setting_dim_0,
size_t setting_dim_1)
{
return;
};
void HDynamicCNNManyIP::gpu_occupancy_import(
int64_t setting_memory_addr,
size_t setting_dim_0,
size_t setting_dim_1
)
{
return;
};

View file

@ -38,6 +38,20 @@ class HDynamicCNNManyIP
float forgetting_offset,
int64_t gpu_tuning_factor);
void gpu_occupancy_export(
size_t dim_x,
size_t dim_y,
size_t number_of_pattern,
size_t h_dim,
int64_t setting_memory_addr,
size_t setting_dim_0,
size_t setting_dim_1);
void gpu_occupancy_import(
int64_t setting_memory_addr,
size_t setting_dim_0,
size_t setting_dim_1);
private:
bool update(

View file

@ -9,6 +9,10 @@ PYBIND11_MODULE(PyHDynamicCNNManyIP, m)
m.doc() = "HDynamicCNNManyIP Module";
py::class_<HDynamicCNNManyIP>(m, "HDynamicCNNManyIP")
.def(py::init<>())
.def("gpu_occupancy_export",
&HDynamicCNNManyIP::gpu_occupancy_export)
.def("gpu_occupancy_import",
&HDynamicCNNManyIP::gpu_occupancy_import)
.def("update",
&HDynamicCNNManyIP::update_entrypoint);
}

View file

@ -10,6 +10,10 @@ PYBIND11_MODULE(PySpikeGeneration2DManyIP, m)
m.doc() = "SpikeGeneration2DManyIP Module";
py::class_<SpikeGeneration2DManyIP>(m, "SpikeGeneration2DManyIP")
.def(py::init<>())
.def("gpu_occupancy_export",
&SpikeGeneration2DManyIP::gpu_occupancy_export)
.def("gpu_occupancy_import",
&SpikeGeneration2DManyIP::gpu_occupancy_import)
.def("spike_generation",
&SpikeGeneration2DManyIP::spike_generation_entrypoint);
}

View file

@ -388,3 +388,24 @@ bool SpikeGeneration2DManyIP::gpu_spike_generation(
return true;
};
void SpikeGeneration2DManyIP::gpu_occupancy_export(
size_t dim_x,
size_t dim_y,
size_t number_of_pattern,
size_t spike_dim,
int64_t setting_memory_addr,
size_t setting_dim_0,
size_t setting_dim_1)
{
return;
};
void SpikeGeneration2DManyIP::gpu_occupancy_import(
int64_t setting_memory_addr,
size_t setting_dim_0,
size_t setting_dim_1)
{
return;
};

View file

@ -13,13 +13,22 @@ class SpikeGeneration2DManyIP
~SpikeGeneration2DManyIP();
bool spike_generation_entrypoint(
int64_t input_pointer_addr, int64_t input_dim_0,
int64_t input_dim_1, int64_t input_dim_2, int64_t input_dim_3,
int64_t random_values_pointer_addr, int64_t random_values_dim_0,
int64_t random_values_dim_1, int64_t random_values_dim_2,
int64_t random_values_dim_3, int64_t output_pointer_addr,
int64_t output_dim_0, int64_t output_dim_1, int64_t output_dim_2,
int64_t output_dim_3, int64_t number_of_cpu_processes);
int64_t input_pointer_addr,
int64_t input_dim_0,
int64_t input_dim_1,
int64_t input_dim_2,
int64_t input_dim_3,
int64_t random_values_pointer_addr,
int64_t random_values_dim_0,
int64_t random_values_dim_1,
int64_t random_values_dim_2,
int64_t random_values_dim_3,
int64_t output_pointer_addr,
int64_t output_dim_0,
int64_t output_dim_1,
int64_t output_dim_2,
int64_t output_dim_3,
int64_t number_of_cpu_processes);
bool spike_generation(
float* input_pointer,
@ -59,6 +68,20 @@ class SpikeGeneration2DManyIP
size_t h_dim,
size_t number_of_pattern);
void gpu_occupancy_export(
size_t dim_x,
size_t dim_y,
size_t number_of_pattern,
size_t spike_dim,
int64_t setting_memory_addr,
size_t setting_dim_0,
size_t setting_dim_1);
void gpu_occupancy_import(
int64_t setting_memory_addr,
size_t setting_dim_0,
size_t setting_dim_1);
private:
size_t lower_bound(float* data_ptr, size_t data_length,
size_t data_ptr_stride,