Skip to content

Commit

Permalink
Merge pull request #61 from breezedeus/pytorch
Browse files Browse the repository at this point in the history
fix device value
  • Loading branch information
breezedeus authored Jul 2, 2023
2 parents 40dd181 + 963ba92 commit 259e8ba
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package:
rm -rf build
python setup.py sdist bdist_wheel

VERSION = 1.2.3.1
VERSION = 1.2.3.2
upload:
python -m twine upload dist/cnstd-$(VERSION)* --verbose

Expand Down
5 changes: 5 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes

# Update 2023.07.02:发布 V1.2.3.2

主要变更:
* 修复参数 `device` 的取值bug,感谢 @Shadow-Alex

# Update 2023.06.30:发布 V1.2.3.1

主要变更:
Expand Down
2 changes: 1 addition & 1 deletion cnstd/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
# specific language governing permissions and limitations
# under the License.

__version__ = '1.2.3.1'
__version__ = '1.2.3.2'
2 changes: 2 additions & 0 deletions cnstd/yolov7/layout_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ def __init__(
self._model_type = model_type
self._model_backend = model_backend

if device.lower().strip() in ('cuda', 'cuda:0', 'gpu'):
device = '0'
self.device = select_device(device)

self._assert_and_prepare_model_files(model_fp, root)
Expand Down

0 comments on commit 259e8ba

Please sign in to comment.