dmlc / dmlc/experimental-lda

Threading unsafe updater?

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
127
Forks
58
PR merge metrics
No merged PRs in 30d

Description

It seems that updater function in parallelLDA is threading unsafe. The task of updating words-topic distribution is split by word label, which makes the same words not be operated in the same time. But the updating function also contains topic array updating. Could it make the same topic operated by different thread in the same time?

The updating queue is pushed in model::sampling with the following code:

```
cbuff[nst*(w%ntt)+i].push(delta(w,old_topic, topic));
```

And then the updating function:

```
virtual int updater(int i) // updating sufficient statistics, can be outsourced to children
{
do
{
for (int tn = 0; tn

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.