Skip to content

Conversation

@itspooya
Copy link
Contributor

Hi,
Previously I have created following pull request to fix an issue which was present on older golang versions
#1297
but golang v1.25 has added this feature and I think based on that, using a custom library is not needed anymore
https://go.dev/doc/go1.25#container-aware-gomaxprocs

@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 17, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@itspooya itspooya force-pushed the remove-automaxprocs branch 2 times, most recently from f4de636 to 1bd23fe Compare December 17, 2025 17:56
@itspooya
Copy link
Contributor Author

I think previously @tariq1890 reviewed previous Pull request
If you could review this as well, it would be great

@cdesiniotis
Copy link
Contributor

Thanks for the contribution @itspooya. Would you be able to rebase and resolve the merge conflicts?

@cdesiniotis
Copy link
Contributor

I was able to confirm this is working as expected. Below is how I verified.

I added the below print statements to the top of main.go:

fmt.Println("GOMAXPROCS:", runtime.GOMAXPROCS(0))
fmt.Println("NumCPU:", runtime.NumCPU())

Before df18cd2 was introduced, the output was below:

GOMAXPROCS: 32
NumCPU: 32
{"level":"info","ts":1767744021.0677776,"msg":"version: v24.9.2, commit: b19241abc-dirty"}

After df18cd2 was introduced, the output became:

2026/01/06 23:34:20 maxprocs: Updating GOMAXPROCS=1: using minimum allowed GOMAXPROCS
GOMAXPROCS: 1
NumCPU: 32
{"level":"info","ts":1767742460.8121657,"msg":"version: v25.10.1, commit: a36470a50-dirty"}

And with the changes introduced in this PR (using the functionality from the Go standard library), the output is:

GOMAXPROCS: 2
NumCPU: 32
{"level":"info","ts":1767742594.565255,"msg":"version: v25.10.1, commit: 1bd23fe2e-dirty"}

This appears to be the expected behavior according to https://pkg.go.dev/runtime#hdr-Implementation_details-GOMAXPROCS.

@cdesiniotis cdesiniotis added this to the v26.x milestone Jan 7, 2026
Signed-off-by: itspooya <pooyadowlat@gmail.com>
@itspooya itspooya force-pushed the remove-automaxprocs branch from 1bd23fe to 015a568 Compare January 12, 2026 05:59
@cdesiniotis
Copy link
Contributor

/ok to test 015a568

Copy link
Contributor

@cdesiniotis cdesiniotis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itspooya thanks for the contribution.

@cdesiniotis cdesiniotis merged commit 83cffd9 into NVIDIA:main Jan 12, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants