Skip to content

Enable configurable deterministic algorithm flag #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yhna940
Copy link

@yhna940 yhna940 commented May 5, 2025

This PR introduces a new model configuration parameter, ENABLE_DETERMINISTIC_ALGORITHMS, to control whether PyTorch runs with deterministic algorithms enabled.

  • Adds enable_deterministic_algorithms_ flag in ModelState
  • Parses the flag from model configuration
  • Calls at::globalContext().setDeterministicAlgorithms(...) during model execution
  • Updates README.md to document the new parameter

When enabled, operations without deterministic implementations will raise errors. Default behavior remains unchanged (disabled).

@yhna940 yhna940 changed the title Enable configurable deterministic algorithm flag in PyTorch backend Enable configurable deterministic algorithm flag May 5, 2025
@yhna940 yhna940 force-pushed the feature/torch-deterministic branch from 22ad881 to c44ed3f Compare May 6, 2025 11:50
@yhna940 yhna940 force-pushed the feature/torch-deterministic branch from c44ed3f to 57e6fa3 Compare May 6, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant