Skip to content

Commit

Permalink
Added Partial Support for the groups Argument for Convolutional Lay…
Browse files Browse the repository at this point in the history
…ers for 1.1.5 Release (#105)

* Added partial support for the `groups` argument for convolutional layers.
* Fixed patching procedure in `memtorch.mn.module.patch_model` and `memtorch.bh.nonideality.apply_nonidealities` to fix semantic error in `Tutorial.ipynb`.
* Fixed import statement in `Exemplar_Simulations.ipynb`.
* Further modularized patching logic in `memtorch.bh.nonideality.NonIdeality` and `memtorch.mn.Module`.
* Modified default number of worker in `memtorch.utils` from 2 to 1.
  • Loading branch information
coreylammie committed Oct 7, 2021
1 parent 0dfdbe1 commit 76847ba
Show file tree
Hide file tree
Showing 11 changed files with 650 additions and 615 deletions.
18 changes: 7 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
## Added

1. Added Patching Support for `torch.nn.Sequential` containers.
2. Added support for modeling source and line resistances for passive crossbars/tiles.
3. Added C++ and CUDA bindings for modeling source and line resistances for passive crossbars/tiles\*.
4. Added a new MemTorch logo to `README.md`
5. Added the `set_cuda_malloc_heap_size` routine to patched `torch.mn` modules.
6. Added unit tests for source and line resistance modeling.
7. Relaxed requirements for programming passive crossbars/tiles.
1. Partial support for the `groups` argument for convolutional layers.

**\*Note** it is strongly suggested to set `cuda_malloc_heap_size` using `m.set_cuda_malloc_heap_size` manually when simulating source and line resistances using CUDA bindings.
## Fixed

1. Patching procedure in `memtorch.mn.module.patch_model` and `memtorch.bh.nonideality.apply_nonidealities` to fix semantic error in `Tutorial.ipynb`.
2. Import statement in `Exemplar_Simulations.ipynb`.

## Enhanced

1. Modularized patching logic in `memtorch.bh.nonideality.NonIdeality` and `memtorch.mn.Module`.
2. Updated `ReadTheDocs` documentation.
3. Transitioned from `Gitter` to `GitHub Discussions` for general discussion.
1. Further modularized patching logic in `memtorch.bh.nonideality.NonIdeality` and `memtorch.mn.Module`.
2. Modified default number of worker in `memtorch.utils` from 2 to 1.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
author = "Corey Lammie"

# The full version, including alpha/beta/rc tags
release = "1.1.4"
release = "1.1.5"
autodoc_inherit_docstrings = False

# -- General configuration ---------------------------------------------------
Expand Down
15 changes: 1 addition & 14 deletions memtorch/bh/nonideality/NonIdeality.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,7 @@ def apply_nonidealities(model, non_idealities, **kwargs):
"""

def apply_patched_module(model, patched_module, name, m):
if name.__contains__("."):
sequence_container, module = name.split(".")
if module.isdigit():
module = int(module)
model._modules[sequence_container][module] = patched_module
else:
setattr(
model._modules[sequence_container],
"%s" % module,
patched_module,
)
else:
model._modules[name] = patched_module

model._modules[name] = patched_module
return model

for _, (name, m) in enumerate(list(model.named_modules())):
Expand Down
Loading

0 comments on commit 76847ba

Please sign in to comment.