Skip to content

Commit 352e77d

Browse files
committed
doc: Added instructions to create a patch file
Signed-off-by: Brandon Groth <[email protected]>
1 parent 9f3713e commit 352e77d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

patches/README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,21 @@ python3 install_patches.py
88
```
99

1010
The following optional packages require a patch:
11-
* `microxcaling`: Uses outdated versions of PyTorch-related packages
11+
* `microxcaling`: Uses outdated versions of PyTorch-related packages
12+
13+
## Making a Patch File
14+
To make a git diff patch file, first make your desired changes to the repository. Then run
15+
```
16+
git diff > <package>.patch
17+
```
18+
Packages may include files that differ by whitespaces even if you didn't change them.
19+
To address this, add `--ignore-all-spaces` to the `git diff` command.
20+
21+
To test the patch file, copy the `<package>.patch` file to `fms-model-optimizer/patches`.
22+
Next add a new entry to the `install_patches.py` dictionary called `dependencies_with_patch` with the package name and repo URL:
23+
```
24+
dependencies_with_patch = {
25+
<package>: <URL>, # for <package>.patch
26+
}
27+
```
28+
Lastly, run the python command for `install_patches.py`.

0 commit comments

Comments
 (0)