Skip to content
Snippets Groups Projects
Commit 74aab3cd authored by Hashim Sharif's avatar Hashim Sharif
Browse files

merging

parents 3475f14d a543be44
No related branches found
No related tags found
No related merge requests found
......@@ -390,10 +390,10 @@ __global__ void vecMul(float* A, float* B, int n){
void initRandValues(Tensor* bias, int error_scale){
float scaling_values[20];
// FIXIT: Error knob 0 should be 0 zero
scaling_values[0] = 0.007;
scaling_values[1] = 0.015;
scaling_values[0] = 0.000;
scaling_values[1] = 0.01;
scaling_values[2] = 0.03;
scaling_values[3] = 0.06;
scaling_values[4] = 0.08;
......@@ -583,7 +583,7 @@ void* addRoundError(void* x_ptr, int error_scale){
// Routine for Adding Gaussian Error
void* addGaussianError(void* x_ptr, int error_scale){
if(error_scale > 11 || error_scale < 0){
if(error_scale > 20 || error_scale < 0){
ERROR("Error Scale out of bounds \n");
}
......@@ -627,6 +627,10 @@ void* addGaussianError(void* x_ptr, int error_scale){
//Norm_t* norms = calculateNorms2(x, x_original);
Norm_t* norms = calculateNormsGPU(x, x_original);
freeTensor(x_original);
freeTensor(bias);
profileEvent("tensorAddError_end", true);
......
......@@ -14,6 +14,7 @@
#include <random>
#include <string>
#include <unordered_map>
#include <cuda_runtime.h>
......@@ -47,6 +48,8 @@ extern "C"{
void profileEvent(char* event_name, bool compare_previous = false){
checkCudaErrors(cudaDeviceSynchronize());
auto it = func_counters.find(event_name);
if(it == func_counters.end()){
func_counters[event_name] = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment