dotnet / dotnet/machinelearning

FastForest multithreading

Open
#6,215 4 comments 0 reactions 0 assignees View on GitHub
area-Trees tenet-performance
Dominant language
C#
Stars
9.4k
Forks
2k
Avg merge
2d 20h
Merged PRs (30d)
11

Description

**System Information (please complete the following information):**
- OS & Version: Windows 10 19044.1706
- ML.NET Version: 1.7.1 x64
- .NET Version: v4.8 x64

**Describe the bug**
I'm running tests with FastForest on machine with 2 processors with 12 cores each with a total of 48 threads, the program running the test is using 48 threads, but the highest CPU the program gets is 14%, which 7 maybe 8 threads. This leads me to believe the FastForest training algo is doing some locking.

**To Reproduce**
Steps to reproduce the behavior:
1. Create as many threads as the machine has
2. var trainer = context.BinaryClassification.Trainers.FastForest(label, numberOfTrees: trees);
3. var trained = trainer.Fit(inputs);
4. look at CPU usage

**Expected behavior**
CPU usage at 100% not significantly less

**Screenshots, Code, Sample Projects**
![image](https://user-images.githubusercontent.com/80936576/172072254-e8693ed3-8464-48f7-af76-763f6bada752.png)
![image](https://user-images.githubusercontent.com/80936576/172072281-c7294eee-4174-4199-afd7-f27c72d4c711.png)

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.