Permalink
Browse files

Fix parallel DNN computation not enabled on VisualStudio, and some sm…

…all fixes
  • Loading branch information...
nitslp-ri committed Oct 2, 2017
1 parent 942fd8b commit 3449ee02e9c9023449a594afd94db3bc9a2e037d
Showing with 6 additions and 2 deletions.
  1. +4 −2 libsent/src/phmm/calc_dnn.c
  2. +2 −0 msvc/libsent/libsent.vcxproj
@@ -417,7 +417,8 @@ static boolean dnn_layer_load(DNNLayer *l, int in, int out, char *wfile, char *b
int num = l->out / thread_num;
/* padding base chunk size to factor of 4 for better SIMD processing */
num = ((num + 3) / 4) * 4;
for (int i = 0; i < thread_num; i++) {
int i;
for (i = 0; i < thread_num; i++) {
l->begin[i] = num * i;
l->end[i] = num * i + num;
if (l->end[i] > l->out) l->end[i] = l->out;
@@ -739,8 +740,9 @@ void dnn_calc_outprob(HMMWork *wrk)
#else
/* compute sum */
{
int i;
float logprob = addlog_array(wrk->last_cache, wrk->statenum);
for (int i = 0; i < wrk->statenum; i++) {
for (i = 0; i < wrk->statenum; i++) {
wrk->last_cache[i] = INV_LOG_TEN * (wrk->last_cache[i] - logprob) - dnn->state_prior[i];
}
}
@@ -62,6 +62,7 @@
<CompileAs>CompileAsC</CompileAs>
<DisableSpecificWarnings>4819;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<OpenMPSupport>true</OpenMPSupport>
</ClCompile>
<Lib>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
@@ -82,6 +83,7 @@
<CompileAs>CompileAsC</CompileAs>
<DisableSpecificWarnings>4819;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<OpenMPSupport>true</OpenMPSupport>
</ClCompile>
<Lib>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>

0 comments on commit 3449ee0

Please sign in to comment.