Skip to content

[BUG] Fix bug in cast in quantization#480

Merged
vadiklyutiy merged 1 commit intomainfrom
vadim/quant-cast
Dec 21, 2024
Merged

[BUG] Fix bug in cast in quantization#480
vadiklyutiy merged 1 commit intomainfrom
vadim/quant-cast

Conversation

@vadiklyutiy
Copy link
Copy Markdown
Collaborator

[BUG] Fix bug in cast in quantization

@vadiklyutiy vadiklyutiy merged commit 04332b7 into main Dec 21, 2024
vadiklyutiy added a commit that referenced this pull request Dec 21, 2024
vadiklyutiy added a commit that referenced this pull request Dec 21, 2024
vadiklyutiy pushed a commit that referenced this pull request Dec 26, 2024
### PR Description

This PR addresses the issue outlined in [Issue
#227](https://github.com/CentML/hidet/issues/227).

#### Problem:
After investigation, the problem arises because multiple threads were
writing to the same `fused_ir` directory. This led to race conditions
where one thread might attempt to delete a file that another thread had
already removed. Moreover, all candidates were being saved into a single
directory, resulting in overwriting of files across different threads.

#### Solution:
This commit introduces the following changes to resolve the issue:

1. **Separate Directories for Each Candidate**: 
- Each candidate now gets its own directory under `fuse_ir`, preventing
conflicts and file overwriting.
   
2. **Subdirectories for IRs by Candidate**:
- The `ir` files are now stored in separate subdirectories under
`candidate/ir`, ensuring that files from different candidates are
isolated.

3. **Test Case Added**:
- A new test case was introduced to verify that the number of folders in
`fuse_ir` matches the total number of candidates listed in
`candidate.txt`.
AndreSlavescu pushed a commit to AndreSlavescu/hidet that referenced this pull request May 31, 2025
…rg#480)

### PR Description

This PR addresses the issue outlined in [Issue
hidet-org#227](CentML/hidet#227).

#### Problem:
After investigation, the problem arises because multiple threads were
writing to the same `fused_ir` directory. This led to race conditions
where one thread might attempt to delete a file that another thread had
already removed. Moreover, all candidates were being saved into a single
directory, resulting in overwriting of files across different threads.

#### Solution:
This commit introduces the following changes to resolve the issue:

1. **Separate Directories for Each Candidate**: 
- Each candidate now gets its own directory under `fuse_ir`, preventing
conflicts and file overwriting.
   
2. **Subdirectories for IRs by Candidate**:
- The `ir` files are now stored in separate subdirectories under
`candidate/ir`, ensuring that files from different candidates are
isolated.

3. **Test Case Added**:
- A new test case was introduced to verify that the number of folders in
`fuse_ir` matches the total number of candidates listed in
`candidate.txt`.
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.

1 participant