PyHierarchicalTsetlinMachineCUDA 0.2.3__tar.gz → 0.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PKG-INFO +1 -1
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PyHierarchicalTsetlinMachineCUDA/kernels.py +17 -17
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PyHierarchicalTsetlinMachineCUDA.egg-info/PKG-INFO +1 -1
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PyHierarchicalTsetlinMachineCUDA.egg-info/SOURCES.txt +1 -5
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/setup.py +1 -1
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/LICENSE +0 -0
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PyHierarchicalTsetlinMachineCUDA/__init__.py +0 -0
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PyHierarchicalTsetlinMachineCUDA/tm.py +0 -0
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PyHierarchicalTsetlinMachineCUDA/tools.py +0 -0
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PyHierarchicalTsetlinMachineCUDA/utils.py +0 -0
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PyHierarchicalTsetlinMachineCUDA.egg-info/dependency_links.txt +0 -0
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PyHierarchicalTsetlinMachineCUDA.egg-info/requires.txt +0 -0
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/PyHierarchicalTsetlinMachineCUDA.egg-info/top_level.txt +0 -0
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/README.md +0 -0
- {PyHierarchicalTsetlinMachineCUDA-0.2.3 → PyHierarchicalTsetlinMachineCUDA-0.2.5}/setup.cfg +0 -0
|
@@ -159,12 +159,12 @@ code_update = """
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
// Evaluate example
|
|
162
|
-
__global__ void evaluate_leaves(unsigned int *global_ta_state, int *component_weights,
|
|
162
|
+
__global__ void evaluate_leaves(unsigned int *global_ta_state, int *component_weights, int *global_component_output, int depth, int *hierarchy_structure_factors, int *hierarchy_structure_alternatives, int *X, int example)
|
|
163
163
|
{
|
|
164
164
|
int index = blockIdx.x * blockDim.x + threadIdx.x;
|
|
165
165
|
int stride = blockDim.x * gridDim.x;
|
|
166
166
|
|
|
167
|
-
int *Xi = &X[(long long)example*LITERAL_CHUNKS];
|
|
167
|
+
int *Xi = &X[(unsigned long long)example*LITERAL_CHUNKS];
|
|
168
168
|
|
|
169
169
|
// Evaluate each clause component (leaf) in separate threads
|
|
170
170
|
for (int clause_component = index; clause_component < CLAUSES*COMPONENTS; clause_component += stride) {
|
|
@@ -204,7 +204,7 @@ code_update = """
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
__global__ void evaluate_or_groups(
|
|
207
|
+
__global__ void evaluate_or_groups(int *child_input, int *or_group_node_output, int number_of_or_group_nodes, int number_of_or_group_addends)
|
|
208
208
|
{
|
|
209
209
|
int index = blockIdx.x * blockDim.x + threadIdx.x;
|
|
210
210
|
int stride = blockDim.x * gridDim.x;
|
|
@@ -212,14 +212,14 @@ code_update = """
|
|
|
212
212
|
// Add up the votes of each OR node child
|
|
213
213
|
for (int or_group_node = index; or_group_node < CLAUSES*number_of_or_group_nodes; or_group_node += stride) {
|
|
214
214
|
// Add OR addends
|
|
215
|
-
|
|
215
|
+
int or_group_vote_sum = 0;
|
|
216
216
|
for (int or_addend = 0; or_addend < number_of_or_group_addends; ++or_addend) {
|
|
217
217
|
// Aggregate votes from each child node through addition
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
int previous_or_group_vote_sum = or_group_vote_sum;
|
|
220
220
|
or_group_vote_sum += child_input[or_group_node*number_of_or_group_addends + or_addend];
|
|
221
221
|
if (or_group_vote_sum < 0) {
|
|
222
|
-
printf("OR* OVERFLOW %
|
|
222
|
+
printf("OR* OVERFLOW %d -> %d\\n", previous_or_group_vote_sum, or_group_vote_sum);
|
|
223
223
|
or_group_vote_sum = previous_or_group_vote_sum;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
@@ -229,7 +229,7 @@ code_update = """
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
__global__ void evaluate_and_groups(
|
|
232
|
+
__global__ void evaluate_and_groups(int *child_input, int *and_group_node_output, int number_of_and_group_nodes, int number_of_and_group_factors)
|
|
233
233
|
{
|
|
234
234
|
int index = blockIdx.x * blockDim.x + threadIdx.x;
|
|
235
235
|
int stride = blockDim.x * gridDim.x;
|
|
@@ -237,15 +237,15 @@ code_update = """
|
|
|
237
237
|
// Multiply the votes from the children of each AND node
|
|
238
238
|
for (int and_group_node = index; and_group_node < CLAUSES*number_of_and_group_nodes; and_group_node += stride) {
|
|
239
239
|
// Multiply and factors
|
|
240
|
-
|
|
240
|
+
int and_group_vote_product = 1;
|
|
241
241
|
for (int and_factor = 0; and_factor < number_of_and_group_factors; ++and_factor) {
|
|
242
242
|
// Aggregate votes from each child node through multiplication
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
int previous_and_group_vote_product = and_group_vote_product;
|
|
245
245
|
and_group_vote_product *= child_input[and_group_node*number_of_and_group_factors + and_factor];
|
|
246
246
|
|
|
247
247
|
if (and_group_vote_product < 0) {
|
|
248
|
-
printf("AND OVERFLOW %
|
|
248
|
+
printf("AND OVERFLOW %d -> %d\\n", previous_and_group_vote_product, and_group_vote_product);
|
|
249
249
|
and_group_vote_product = previous_and_group_vote_product;
|
|
250
250
|
}
|
|
251
251
|
}
|
|
@@ -255,7 +255,7 @@ code_update = """
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
__global__ void propagate_and_group_false_truth_values(
|
|
258
|
+
__global__ void propagate_and_group_false_truth_values(int *child_input, int *group_node_output, int number_of_group_nodes, int number_of_group_node_children)
|
|
259
259
|
{
|
|
260
260
|
int index = blockIdx.x * blockDim.x + threadIdx.x;
|
|
261
261
|
int stride = blockDim.x * gridDim.x;
|
|
@@ -272,7 +272,7 @@ code_update = """
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
__global__ void evaluate_or_alternatives(
|
|
275
|
+
__global__ void evaluate_or_alternatives(int *child_input, int *or_alternatives_node_output, int number_of_or_alternatives_nodes, int number_of_or_alternatives)
|
|
276
276
|
{
|
|
277
277
|
int index = blockIdx.x * blockDim.x + threadIdx.x;
|
|
278
278
|
int stride = blockDim.x * gridDim.x;
|
|
@@ -280,16 +280,16 @@ code_update = """
|
|
|
280
280
|
// Add up the votes from the children of each OR node
|
|
281
281
|
for (int or_alternatives_node = index; or_alternatives_node < CLAUSES*number_of_or_alternatives_nodes; or_alternatives_node += stride) {
|
|
282
282
|
// Sum up votes from each or alternative
|
|
283
|
-
|
|
283
|
+
int or_alternatives_vote_sum = 0;
|
|
284
284
|
for (int or_alternative = 0; or_alternative < number_of_or_alternatives; ++or_alternative) {
|
|
285
285
|
// Aggregate same input or alternatives through summation
|
|
286
286
|
|
|
287
287
|
|
|
288
|
-
|
|
288
|
+
int previous_or_alternatives_vote_sum = or_alternatives_vote_sum;
|
|
289
289
|
or_alternatives_vote_sum += child_input[or_alternatives_node * number_of_or_alternatives + or_alternative];
|
|
290
290
|
|
|
291
291
|
if (or_alternatives_vote_sum < 0) {
|
|
292
|
-
printf("OR OVERFLOW %
|
|
292
|
+
printf("OR OVERFLOW %d -> %d\\n", previous_or_alternatives_vote_sum, or_alternatives_vote_sum);
|
|
293
293
|
or_alternatives_vote_sum = previous_or_alternatives_vote_sum;
|
|
294
294
|
}
|
|
295
295
|
}
|
|
@@ -299,7 +299,7 @@ code_update = """
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
__global__ void evaluate_final(int number_of_outputs,
|
|
302
|
+
__global__ void evaluate_final(int number_of_outputs, int *child_input, int *clause_weights, int *class_sum)
|
|
303
303
|
{
|
|
304
304
|
int index = blockIdx.x * blockDim.x + threadIdx.x;
|
|
305
305
|
int stride = blockDim.x * gridDim.x;
|
|
@@ -316,7 +316,7 @@ code_update = """
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
// Update state of Tsetlin Automata team
|
|
319
|
-
__global__ void update_hierarchy(curandState *state, int number_of_outputs, unsigned int *global_ta_state, int *clause_weights,
|
|
319
|
+
__global__ void update_hierarchy(curandState *state, int number_of_outputs, unsigned int *global_ta_state, int *clause_weights, int *component_output, int depth, int *hierarchy_structure_factors, int *hierarchy_structure_alternatives, int *class_sum, int *X, int *y, int example)
|
|
320
320
|
{
|
|
321
321
|
int index = blockIdx.x * blockDim.x + threadIdx.x;
|
|
322
322
|
int stride = blockDim.x * gridDim.x;
|
|
@@ -10,8 +10,4 @@ PyHierarchicalTsetlinMachineCUDA.egg-info/PKG-INFO
|
|
|
10
10
|
PyHierarchicalTsetlinMachineCUDA.egg-info/SOURCES.txt
|
|
11
11
|
PyHierarchicalTsetlinMachineCUDA.egg-info/dependency_links.txt
|
|
12
12
|
PyHierarchicalTsetlinMachineCUDA.egg-info/requires.txt
|
|
13
|
-
PyHierarchicalTsetlinMachineCUDA.egg-info/top_level.txt
|
|
14
|
-
pyhierarchicaltsetlinmachinecuda.egg-info/PKG-INFO
|
|
15
|
-
pyhierarchicaltsetlinmachinecuda.egg-info/SOURCES.txt
|
|
16
|
-
pyhierarchicaltsetlinmachinecuda.egg-info/dependency_links.txt
|
|
17
|
-
pyhierarchicaltsetlinmachinecuda.egg-info/top_level.txt
|
|
13
|
+
PyHierarchicalTsetlinMachineCUDA.egg-info/top_level.txt
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|