Add files via upload
This commit is contained in:
parent
dcee82fca6
commit
3622b91591
6 changed files with 95 additions and 7 deletions
|
@ -711,4 +711,26 @@ bool HDynamicCNNManyIP::gpu_update(
|
||||||
|
|
||||||
|
|
||||||
return true;
|
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;
|
||||||
};
|
};
|
|
@ -38,6 +38,20 @@ class HDynamicCNNManyIP
|
||||||
float forgetting_offset,
|
float forgetting_offset,
|
||||||
int64_t gpu_tuning_factor);
|
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:
|
private:
|
||||||
|
|
||||||
bool update(
|
bool update(
|
||||||
|
|
|
@ -9,6 +9,10 @@ PYBIND11_MODULE(PyHDynamicCNNManyIP, m)
|
||||||
m.doc() = "HDynamicCNNManyIP Module";
|
m.doc() = "HDynamicCNNManyIP Module";
|
||||||
py::class_<HDynamicCNNManyIP>(m, "HDynamicCNNManyIP")
|
py::class_<HDynamicCNNManyIP>(m, "HDynamicCNNManyIP")
|
||||||
.def(py::init<>())
|
.def(py::init<>())
|
||||||
|
.def("gpu_occupancy_export",
|
||||||
|
&HDynamicCNNManyIP::gpu_occupancy_export)
|
||||||
|
.def("gpu_occupancy_import",
|
||||||
|
&HDynamicCNNManyIP::gpu_occupancy_import)
|
||||||
.def("update",
|
.def("update",
|
||||||
&HDynamicCNNManyIP::update_entrypoint);
|
&HDynamicCNNManyIP::update_entrypoint);
|
||||||
}
|
}
|
|
@ -10,6 +10,10 @@ PYBIND11_MODULE(PySpikeGeneration2DManyIP, m)
|
||||||
m.doc() = "SpikeGeneration2DManyIP Module";
|
m.doc() = "SpikeGeneration2DManyIP Module";
|
||||||
py::class_<SpikeGeneration2DManyIP>(m, "SpikeGeneration2DManyIP")
|
py::class_<SpikeGeneration2DManyIP>(m, "SpikeGeneration2DManyIP")
|
||||||
.def(py::init<>())
|
.def(py::init<>())
|
||||||
|
.def("gpu_occupancy_export",
|
||||||
|
&SpikeGeneration2DManyIP::gpu_occupancy_export)
|
||||||
|
.def("gpu_occupancy_import",
|
||||||
|
&SpikeGeneration2DManyIP::gpu_occupancy_import)
|
||||||
.def("spike_generation",
|
.def("spike_generation",
|
||||||
&SpikeGeneration2DManyIP::spike_generation_entrypoint);
|
&SpikeGeneration2DManyIP::spike_generation_entrypoint);
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,4 +387,25 @@ bool SpikeGeneration2DManyIP::gpu_spike_generation(
|
||||||
cudaDeviceSynchronize();
|
cudaDeviceSynchronize();
|
||||||
|
|
||||||
return true;
|
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;
|
||||||
};
|
};
|
|
@ -13,13 +13,22 @@ class SpikeGeneration2DManyIP
|
||||||
~SpikeGeneration2DManyIP();
|
~SpikeGeneration2DManyIP();
|
||||||
|
|
||||||
bool spike_generation_entrypoint(
|
bool spike_generation_entrypoint(
|
||||||
int64_t input_pointer_addr, int64_t input_dim_0,
|
int64_t input_pointer_addr,
|
||||||
int64_t input_dim_1, int64_t input_dim_2, int64_t input_dim_3,
|
int64_t input_dim_0,
|
||||||
int64_t random_values_pointer_addr, int64_t random_values_dim_0,
|
int64_t input_dim_1,
|
||||||
int64_t random_values_dim_1, int64_t random_values_dim_2,
|
int64_t input_dim_2,
|
||||||
int64_t random_values_dim_3, int64_t output_pointer_addr,
|
int64_t input_dim_3,
|
||||||
int64_t output_dim_0, int64_t output_dim_1, int64_t output_dim_2,
|
int64_t random_values_pointer_addr,
|
||||||
int64_t output_dim_3, int64_t number_of_cpu_processes);
|
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(
|
bool spike_generation(
|
||||||
float* input_pointer,
|
float* input_pointer,
|
||||||
|
@ -59,6 +68,20 @@ class SpikeGeneration2DManyIP
|
||||||
size_t h_dim,
|
size_t h_dim,
|
||||||
size_t number_of_pattern);
|
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:
|
private:
|
||||||
size_t lower_bound(float* data_ptr, size_t data_length,
|
size_t lower_bound(float* data_ptr, size_t data_length,
|
||||||
size_t data_ptr_stride,
|
size_t data_ptr_stride,
|
||||||
|
|
Loading…
Reference in a new issue