1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
|
%global _empty_manifest_terminate_build 0
Name: python-aihwkit
Version: 0.7.1
Release: 1
Summary: IBM Analog Hardware Acceleration Kit
License: Apache 2.0
URL: https://github.com/IBM/aihwkit
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/45/37/9090df4bfa50b1ce6924052c99a5d6b6b91d6ee58b27df4089213e431e61/aihwkit-0.7.1.tar.gz
BuildArch: noarch
Requires: python3-torch
Requires: python3-torchvision
Requires: python3-scipy
Requires: python3-requests
Requires: python3-numpy
Requires: python3-protobuf
Requires: python3-transformers
Requires: python3-evaluate
Requires: python3-datasets
Requires: python3-wandb
Requires: python3-tensorboard
Requires: python3-lmfit
Requires: python3-matplotlib
%description
# IBM Analog Hardware Acceleration Kit

[](https://aihwkit.readthedocs.io/en/latest/?badge=latest)
[](https://travis-ci.com/IBM/aihwkit)

[](https://arxiv.org/abs/2104.02184)
## Description
_IBM Analog Hardware Acceleration Kit_ is an open source Python toolkit for
exploring and using the capabilities of in-memory computing devices in the
context of artificial intelligence.
> :warning: This library is currently in beta and under active development.
> Please be mindful of potential issues and keep an eye for improvements,
> new features and bug fixes in upcoming versions.
The toolkit consists of two main components:
### Pytorch integration
A series of primitives and features that allow using the toolkit within
[`PyTorch`]:
* Analog neural network modules (fully connected layer, 1d/2d/3d convolution
layers, LSTM layer, sequential container).
* Analog training using torch training workflow:
* Analog torch optimizers (SGD).
* Analog in-situ training using customizable device models and algorithms
(Tiki-Taka).
* Analog inference using torch inference workflow:
* State-of-the-art statistical model of a phase-change memory (PCM) array
calibrated on hardware measurements from a 1 million PCM devices chip.
* Hardware-aware training with hardware non-idealities and noise
included in the forward pass to make the trained models more
robust during inference on Analog hardware.
### Analog devices simulator
A high-performant (CUDA-capable) C++ simulator that allows for
simulating a wide range of analog devices and crossbar configurations
by using abstract functional models of material characteristics with
adjustable parameters. Features include:
* Forward pass output-referred noise and device fluctuations, as well
as adjustable ADC and DAC discretization and bounds
* Stochastic update pulse trains for rows and columns with finite
weight update size per pulse coincidence
* Device-to-device systematic variations, cycle-to-cycle noise and
adjustable asymmetry during analog update
* Adjustable device behavior for exploration of material specifications for
training and inference
* State-of-the-art dynamic input scaling, bound management, and update
management schemes
### Other features
Along with the two main components, the toolkit includes other
functionalities such as:
* A library of device presets that are calibrated to real hardware data and
based on models in the literature, along with configuration that specifies a particular device and optimizer choice.
* A module for executing high-level use cases ("experiments"), such as neural
network training with minimal code overhead.
* A utility to automatically convert a downloaded model (e.g., pre-trained) to its equivalent Analog
model by replacing all linear/conv layers to Analog layers (e.g., for convenient hardware-aware training).
* Integration with the [AIHW Composer] platform, a no-code web experience, that allows executing
experiments in the cloud.
## Example
### Training example
```python
from torch import Tensor
from torch.nn.functional import mse_loss
# Import the aihwkit constructs.
from aihwkit.nn import AnalogLinear
from aihwkit.optim import AnalogSGD
x = Tensor([[0.1, 0.2, 0.4, 0.3], [0.2, 0.1, 0.1, 0.3]])
y = Tensor([[1.0, 0.5], [0.7, 0.3]])
# Define a network using a single Analog layer.
model = AnalogLinear(4, 2)
# Use the analog-aware stochastic gradient descent optimizer.
opt = AnalogSGD(model.parameters(), lr=0.1)
opt.regroup_param_groups(model)
# Train the network.
for epoch in range(10):
pred = model(x)
loss = mse_loss(pred, y)
loss.backward()
opt.step()
print('Loss error: {:.16f}'.format(loss))
```
You can find more examples in the [`examples/`] folder of the project, and
more information about the library in the [documentation]. Please note that
the examples have some additional dependencies - you can install them via
`pip install -r requirements-examples.txt`.
## What is Analog AI?
In traditional hardware architecture, computation and memory are siloed in
different locations. Information is moved back and forth between computation
and memory units every time an operation is performed, creating a limitation
called the [von Neumann bottleneck].
Analog AI delivers radical performance improvements by combining compute and
memory in a single device, eliminating the von Neumann bottleneck. By leveraging
the physical properties of memory devices, computation happens at the same place
where the data is stored. Such in-memory computing hardware increases the speed
and energy-efficiency needed for next generation AI workloads.
## What is an in-memory computing chip?
An in-memory computing chip typically consists of multiple arrays of memory
devices that communicate with each other. Many types of memory devices such as
[phase-change memory] (PCM), [resistive random-access memory] (RRAM), and
[Flash memory] can be used for in-memory computing.
Memory devices have the ability to store synaptic weights in their analog
charge (Flash) or conductance (PCM, RRAM) state. When these devices are arranged
in a crossbar configuration, it allows to perform an analog matrix-vector
multiplication in a single time step, exploiting the advantages of analog
storage capability and [Kirchhoff’s circuits laws]. You can learn more about
it in our [online demo].
In deep learning, data propagation through multiple layers of a neural network
involves a sequence of matrix multiplications, as each layer can be represented
as a matrix of synaptic weights. The devices are arranged in multiple crossbar
arrays, creating an artificial neural network where all matrix multiplications
are performed in-place in an analog manner. This structure allows to run deep
learning models at reduced energy consumption.
## How to cite?
In case you are using the _IBM Analog Hardware Acceleration Kit_ for
your research, please cite the AICAS21 paper that describes the toolkit:
> Malte J. Rasch, Diego Moreda, Tayfun Gokmen, Manuel Le Gallo, Fabio Carta,
> Cindy Goldberg, Kaoutar El Maghraoui, Abu Sebastian, Vijay Narayanan.
> "A flexible and fast PyTorch toolkit for simulating training and inference on
> analog crossbar arrays" (2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems)
>
> https://ieeexplore.ieee.org/abstract/document/9458494
## Installation
### Installing from PyPI
The preferred way to install this package is by using the
[Python package index]:
```bash
$ pip install aihwkit
```
> :warning: Note that currently we provide CPU-only pre-built packages for
> specific combinations of architectures and versions, and in some cases a
> pre-built package might still not be available.
If you encounter any issues during download or want to compile the package
for your environment, please refer to the [advanced installation] guide.
That section describes the additional libraries and tools required for
compiling the sources, using a build system based on `cmake`.
## Authors
IBM Analog Hardware Acceleration Kit has been developed by IBM Research,
with Malte Rasch, Tayfun Gokmen, Diego Moreda, Manuel Le Gallo-Bourdeau, and Kaoutar El Maghraoui
as the initial core authors, along with many [contributors].
You can contact us by opening a new issue in the repository, or alternatively
at the ``aihwkit@us.ibm.com`` email address.
## License
This project is licensed under [Apache License 2.0].
[Apache License 2.0]: LICENSE.txt
[`CUDA Toolkit`]: https://developer.nvidia.com/accelerated-computing-toolkit
[`OpenBLAS`]: https://www.openblas.net/
[Python package index]: https://pypi.org/project/aihwkit
[`PyTorch`]: https://pytorch.org/
[`examples/`]: examples/
[documentation]: https://aihwkit.readthedocs.io/
[contributors]: https://github.com/IBM/aihwkit/graphs/contributors
[advanced installation]: https://aihwkit.readthedocs.io/en/latest/advanced_install.html
[von Neumann bottleneck]: https://en.wikipedia.org/wiki/Von_Neumann_architecture#Von_Neumann_bottleneck
[phase-change memory]: https://en.wikipedia.org/wiki/Phase-change_memory
[resistive random-access memory]: https://en.wikipedia.org/wiki/Resistive_random-access_memory
[Flash memory]: https://en.wikipedia.org/wiki/Flash_memory
[Kirchhoff’s circuits laws]: https://en.wikipedia.org/wiki/Kirchhoff%27s_circuit_laws
[online demo]: https://analog-ai-demo.mybluemix.net/
[AIHW Composer]: https://aihw-composer.draco.res.ibm.com
%package -n python3-aihwkit
Summary: IBM Analog Hardware Acceleration Kit
Provides: python-aihwkit
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-aihwkit
# IBM Analog Hardware Acceleration Kit

[](https://aihwkit.readthedocs.io/en/latest/?badge=latest)
[](https://travis-ci.com/IBM/aihwkit)

[](https://arxiv.org/abs/2104.02184)
## Description
_IBM Analog Hardware Acceleration Kit_ is an open source Python toolkit for
exploring and using the capabilities of in-memory computing devices in the
context of artificial intelligence.
> :warning: This library is currently in beta and under active development.
> Please be mindful of potential issues and keep an eye for improvements,
> new features and bug fixes in upcoming versions.
The toolkit consists of two main components:
### Pytorch integration
A series of primitives and features that allow using the toolkit within
[`PyTorch`]:
* Analog neural network modules (fully connected layer, 1d/2d/3d convolution
layers, LSTM layer, sequential container).
* Analog training using torch training workflow:
* Analog torch optimizers (SGD).
* Analog in-situ training using customizable device models and algorithms
(Tiki-Taka).
* Analog inference using torch inference workflow:
* State-of-the-art statistical model of a phase-change memory (PCM) array
calibrated on hardware measurements from a 1 million PCM devices chip.
* Hardware-aware training with hardware non-idealities and noise
included in the forward pass to make the trained models more
robust during inference on Analog hardware.
### Analog devices simulator
A high-performant (CUDA-capable) C++ simulator that allows for
simulating a wide range of analog devices and crossbar configurations
by using abstract functional models of material characteristics with
adjustable parameters. Features include:
* Forward pass output-referred noise and device fluctuations, as well
as adjustable ADC and DAC discretization and bounds
* Stochastic update pulse trains for rows and columns with finite
weight update size per pulse coincidence
* Device-to-device systematic variations, cycle-to-cycle noise and
adjustable asymmetry during analog update
* Adjustable device behavior for exploration of material specifications for
training and inference
* State-of-the-art dynamic input scaling, bound management, and update
management schemes
### Other features
Along with the two main components, the toolkit includes other
functionalities such as:
* A library of device presets that are calibrated to real hardware data and
based on models in the literature, along with configuration that specifies a particular device and optimizer choice.
* A module for executing high-level use cases ("experiments"), such as neural
network training with minimal code overhead.
* A utility to automatically convert a downloaded model (e.g., pre-trained) to its equivalent Analog
model by replacing all linear/conv layers to Analog layers (e.g., for convenient hardware-aware training).
* Integration with the [AIHW Composer] platform, a no-code web experience, that allows executing
experiments in the cloud.
## Example
### Training example
```python
from torch import Tensor
from torch.nn.functional import mse_loss
# Import the aihwkit constructs.
from aihwkit.nn import AnalogLinear
from aihwkit.optim import AnalogSGD
x = Tensor([[0.1, 0.2, 0.4, 0.3], [0.2, 0.1, 0.1, 0.3]])
y = Tensor([[1.0, 0.5], [0.7, 0.3]])
# Define a network using a single Analog layer.
model = AnalogLinear(4, 2)
# Use the analog-aware stochastic gradient descent optimizer.
opt = AnalogSGD(model.parameters(), lr=0.1)
opt.regroup_param_groups(model)
# Train the network.
for epoch in range(10):
pred = model(x)
loss = mse_loss(pred, y)
loss.backward()
opt.step()
print('Loss error: {:.16f}'.format(loss))
```
You can find more examples in the [`examples/`] folder of the project, and
more information about the library in the [documentation]. Please note that
the examples have some additional dependencies - you can install them via
`pip install -r requirements-examples.txt`.
## What is Analog AI?
In traditional hardware architecture, computation and memory are siloed in
different locations. Information is moved back and forth between computation
and memory units every time an operation is performed, creating a limitation
called the [von Neumann bottleneck].
Analog AI delivers radical performance improvements by combining compute and
memory in a single device, eliminating the von Neumann bottleneck. By leveraging
the physical properties of memory devices, computation happens at the same place
where the data is stored. Such in-memory computing hardware increases the speed
and energy-efficiency needed for next generation AI workloads.
## What is an in-memory computing chip?
An in-memory computing chip typically consists of multiple arrays of memory
devices that communicate with each other. Many types of memory devices such as
[phase-change memory] (PCM), [resistive random-access memory] (RRAM), and
[Flash memory] can be used for in-memory computing.
Memory devices have the ability to store synaptic weights in their analog
charge (Flash) or conductance (PCM, RRAM) state. When these devices are arranged
in a crossbar configuration, it allows to perform an analog matrix-vector
multiplication in a single time step, exploiting the advantages of analog
storage capability and [Kirchhoff’s circuits laws]. You can learn more about
it in our [online demo].
In deep learning, data propagation through multiple layers of a neural network
involves a sequence of matrix multiplications, as each layer can be represented
as a matrix of synaptic weights. The devices are arranged in multiple crossbar
arrays, creating an artificial neural network where all matrix multiplications
are performed in-place in an analog manner. This structure allows to run deep
learning models at reduced energy consumption.
## How to cite?
In case you are using the _IBM Analog Hardware Acceleration Kit_ for
your research, please cite the AICAS21 paper that describes the toolkit:
> Malte J. Rasch, Diego Moreda, Tayfun Gokmen, Manuel Le Gallo, Fabio Carta,
> Cindy Goldberg, Kaoutar El Maghraoui, Abu Sebastian, Vijay Narayanan.
> "A flexible and fast PyTorch toolkit for simulating training and inference on
> analog crossbar arrays" (2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems)
>
> https://ieeexplore.ieee.org/abstract/document/9458494
## Installation
### Installing from PyPI
The preferred way to install this package is by using the
[Python package index]:
```bash
$ pip install aihwkit
```
> :warning: Note that currently we provide CPU-only pre-built packages for
> specific combinations of architectures and versions, and in some cases a
> pre-built package might still not be available.
If you encounter any issues during download or want to compile the package
for your environment, please refer to the [advanced installation] guide.
That section describes the additional libraries and tools required for
compiling the sources, using a build system based on `cmake`.
## Authors
IBM Analog Hardware Acceleration Kit has been developed by IBM Research,
with Malte Rasch, Tayfun Gokmen, Diego Moreda, Manuel Le Gallo-Bourdeau, and Kaoutar El Maghraoui
as the initial core authors, along with many [contributors].
You can contact us by opening a new issue in the repository, or alternatively
at the ``aihwkit@us.ibm.com`` email address.
## License
This project is licensed under [Apache License 2.0].
[Apache License 2.0]: LICENSE.txt
[`CUDA Toolkit`]: https://developer.nvidia.com/accelerated-computing-toolkit
[`OpenBLAS`]: https://www.openblas.net/
[Python package index]: https://pypi.org/project/aihwkit
[`PyTorch`]: https://pytorch.org/
[`examples/`]: examples/
[documentation]: https://aihwkit.readthedocs.io/
[contributors]: https://github.com/IBM/aihwkit/graphs/contributors
[advanced installation]: https://aihwkit.readthedocs.io/en/latest/advanced_install.html
[von Neumann bottleneck]: https://en.wikipedia.org/wiki/Von_Neumann_architecture#Von_Neumann_bottleneck
[phase-change memory]: https://en.wikipedia.org/wiki/Phase-change_memory
[resistive random-access memory]: https://en.wikipedia.org/wiki/Resistive_random-access_memory
[Flash memory]: https://en.wikipedia.org/wiki/Flash_memory
[Kirchhoff’s circuits laws]: https://en.wikipedia.org/wiki/Kirchhoff%27s_circuit_laws
[online demo]: https://analog-ai-demo.mybluemix.net/
[AIHW Composer]: https://aihw-composer.draco.res.ibm.com
%package help
Summary: Development documents and examples for aihwkit
Provides: python3-aihwkit-doc
%description help
# IBM Analog Hardware Acceleration Kit

[](https://aihwkit.readthedocs.io/en/latest/?badge=latest)
[](https://travis-ci.com/IBM/aihwkit)

[](https://arxiv.org/abs/2104.02184)
## Description
_IBM Analog Hardware Acceleration Kit_ is an open source Python toolkit for
exploring and using the capabilities of in-memory computing devices in the
context of artificial intelligence.
> :warning: This library is currently in beta and under active development.
> Please be mindful of potential issues and keep an eye for improvements,
> new features and bug fixes in upcoming versions.
The toolkit consists of two main components:
### Pytorch integration
A series of primitives and features that allow using the toolkit within
[`PyTorch`]:
* Analog neural network modules (fully connected layer, 1d/2d/3d convolution
layers, LSTM layer, sequential container).
* Analog training using torch training workflow:
* Analog torch optimizers (SGD).
* Analog in-situ training using customizable device models and algorithms
(Tiki-Taka).
* Analog inference using torch inference workflow:
* State-of-the-art statistical model of a phase-change memory (PCM) array
calibrated on hardware measurements from a 1 million PCM devices chip.
* Hardware-aware training with hardware non-idealities and noise
included in the forward pass to make the trained models more
robust during inference on Analog hardware.
### Analog devices simulator
A high-performant (CUDA-capable) C++ simulator that allows for
simulating a wide range of analog devices and crossbar configurations
by using abstract functional models of material characteristics with
adjustable parameters. Features include:
* Forward pass output-referred noise and device fluctuations, as well
as adjustable ADC and DAC discretization and bounds
* Stochastic update pulse trains for rows and columns with finite
weight update size per pulse coincidence
* Device-to-device systematic variations, cycle-to-cycle noise and
adjustable asymmetry during analog update
* Adjustable device behavior for exploration of material specifications for
training and inference
* State-of-the-art dynamic input scaling, bound management, and update
management schemes
### Other features
Along with the two main components, the toolkit includes other
functionalities such as:
* A library of device presets that are calibrated to real hardware data and
based on models in the literature, along with configuration that specifies a particular device and optimizer choice.
* A module for executing high-level use cases ("experiments"), such as neural
network training with minimal code overhead.
* A utility to automatically convert a downloaded model (e.g., pre-trained) to its equivalent Analog
model by replacing all linear/conv layers to Analog layers (e.g., for convenient hardware-aware training).
* Integration with the [AIHW Composer] platform, a no-code web experience, that allows executing
experiments in the cloud.
## Example
### Training example
```python
from torch import Tensor
from torch.nn.functional import mse_loss
# Import the aihwkit constructs.
from aihwkit.nn import AnalogLinear
from aihwkit.optim import AnalogSGD
x = Tensor([[0.1, 0.2, 0.4, 0.3], [0.2, 0.1, 0.1, 0.3]])
y = Tensor([[1.0, 0.5], [0.7, 0.3]])
# Define a network using a single Analog layer.
model = AnalogLinear(4, 2)
# Use the analog-aware stochastic gradient descent optimizer.
opt = AnalogSGD(model.parameters(), lr=0.1)
opt.regroup_param_groups(model)
# Train the network.
for epoch in range(10):
pred = model(x)
loss = mse_loss(pred, y)
loss.backward()
opt.step()
print('Loss error: {:.16f}'.format(loss))
```
You can find more examples in the [`examples/`] folder of the project, and
more information about the library in the [documentation]. Please note that
the examples have some additional dependencies - you can install them via
`pip install -r requirements-examples.txt`.
## What is Analog AI?
In traditional hardware architecture, computation and memory are siloed in
different locations. Information is moved back and forth between computation
and memory units every time an operation is performed, creating a limitation
called the [von Neumann bottleneck].
Analog AI delivers radical performance improvements by combining compute and
memory in a single device, eliminating the von Neumann bottleneck. By leveraging
the physical properties of memory devices, computation happens at the same place
where the data is stored. Such in-memory computing hardware increases the speed
and energy-efficiency needed for next generation AI workloads.
## What is an in-memory computing chip?
An in-memory computing chip typically consists of multiple arrays of memory
devices that communicate with each other. Many types of memory devices such as
[phase-change memory] (PCM), [resistive random-access memory] (RRAM), and
[Flash memory] can be used for in-memory computing.
Memory devices have the ability to store synaptic weights in their analog
charge (Flash) or conductance (PCM, RRAM) state. When these devices are arranged
in a crossbar configuration, it allows to perform an analog matrix-vector
multiplication in a single time step, exploiting the advantages of analog
storage capability and [Kirchhoff’s circuits laws]. You can learn more about
it in our [online demo].
In deep learning, data propagation through multiple layers of a neural network
involves a sequence of matrix multiplications, as each layer can be represented
as a matrix of synaptic weights. The devices are arranged in multiple crossbar
arrays, creating an artificial neural network where all matrix multiplications
are performed in-place in an analog manner. This structure allows to run deep
learning models at reduced energy consumption.
## How to cite?
In case you are using the _IBM Analog Hardware Acceleration Kit_ for
your research, please cite the AICAS21 paper that describes the toolkit:
> Malte J. Rasch, Diego Moreda, Tayfun Gokmen, Manuel Le Gallo, Fabio Carta,
> Cindy Goldberg, Kaoutar El Maghraoui, Abu Sebastian, Vijay Narayanan.
> "A flexible and fast PyTorch toolkit for simulating training and inference on
> analog crossbar arrays" (2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems)
>
> https://ieeexplore.ieee.org/abstract/document/9458494
## Installation
### Installing from PyPI
The preferred way to install this package is by using the
[Python package index]:
```bash
$ pip install aihwkit
```
> :warning: Note that currently we provide CPU-only pre-built packages for
> specific combinations of architectures and versions, and in some cases a
> pre-built package might still not be available.
If you encounter any issues during download or want to compile the package
for your environment, please refer to the [advanced installation] guide.
That section describes the additional libraries and tools required for
compiling the sources, using a build system based on `cmake`.
## Authors
IBM Analog Hardware Acceleration Kit has been developed by IBM Research,
with Malte Rasch, Tayfun Gokmen, Diego Moreda, Manuel Le Gallo-Bourdeau, and Kaoutar El Maghraoui
as the initial core authors, along with many [contributors].
You can contact us by opening a new issue in the repository, or alternatively
at the ``aihwkit@us.ibm.com`` email address.
## License
This project is licensed under [Apache License 2.0].
[Apache License 2.0]: LICENSE.txt
[`CUDA Toolkit`]: https://developer.nvidia.com/accelerated-computing-toolkit
[`OpenBLAS`]: https://www.openblas.net/
[Python package index]: https://pypi.org/project/aihwkit
[`PyTorch`]: https://pytorch.org/
[`examples/`]: examples/
[documentation]: https://aihwkit.readthedocs.io/
[contributors]: https://github.com/IBM/aihwkit/graphs/contributors
[advanced installation]: https://aihwkit.readthedocs.io/en/latest/advanced_install.html
[von Neumann bottleneck]: https://en.wikipedia.org/wiki/Von_Neumann_architecture#Von_Neumann_bottleneck
[phase-change memory]: https://en.wikipedia.org/wiki/Phase-change_memory
[resistive random-access memory]: https://en.wikipedia.org/wiki/Resistive_random-access_memory
[Flash memory]: https://en.wikipedia.org/wiki/Flash_memory
[Kirchhoff’s circuits laws]: https://en.wikipedia.org/wiki/Kirchhoff%27s_circuit_laws
[online demo]: https://analog-ai-demo.mybluemix.net/
[AIHW Composer]: https://aihw-composer.draco.res.ibm.com
%prep
%autosetup -n aihwkit-0.7.1
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-aihwkit -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue May 30 2023 Python_Bot <Python_Bot@openeuler.org> - 0.7.1-1
- Package Spec generated
|