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

BugFix: Setting runtime control policy to BASE (no config change)

parent 504ad4e9
No related branches found
No related tags found
No related merge requests found
......@@ -1508,13 +1508,14 @@ hpvm_rt_readLabelsBatch_cached(const char *labels_file, int start, int end) {
ERROR("Data file %s is not found. Aborting...\n", labels_file);
abort();
}
// Get number of labels
fseek(file, 0, SEEK_END);
long size = ftell(file);
fseek(file, 0, SEEK_SET); // return file pointer to beginning
// Allocate memory for labels
labels_from_file = (uint32_t *)malloc(size);
labels_from_file = (uint32_t *) malloc(size);
if (labels_from_file == NULL) {
ERROR("Memory allocation for labels unsucessfull. Aborting...\n");
abort();
......@@ -1592,9 +1593,9 @@ float hpvm_rt_computeAccuracy3(uint32_t *labels, void *result_ptr) {
}
//#define llvm_hpvm_invokeRtControl_BASE llvm_hpvm_invokeRtControl
#define llvm_hpvm_invokeRtControl_BASE llvm_hpvm_invokeRtControl
//#define llvm_hpvm_invokeRtControl_ADJUST_PR llvm_hpvm_invokeRtControl
#define llvm_hpvm_invokeRtControl_ITERATE llvm_hpvm_invokeRtControl
//#define llvm_hpvm_invokeRtControl_ITERATE llvm_hpvm_invokeRtControl
extern "C" void llvm_hpvm_invokeRtControl_BASE(
void *result, const char *str, int start, int end) {
......
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