Commit Graph

80 Commits

Author SHA1 Message Date
3852a85af3 Boilerplate code for the sum operator. 2023-06-25 09:35:17 +01:00
7ccf27dda2 More general broadcast setup. 2023-06-25 08:55:09 +01:00
213445c0e5 Move the backprop bits to a separate file. 2023-06-24 20:57:49 +01:00
6b2cd9c51c Add the broadcast operator. 2023-06-24 19:16:03 +01:00
a6ca9baf3c Backprop for narrow. 2023-06-24 15:17:57 +01:00
0f34738831 Fix the cpu implementation for narrow. 2023-06-24 15:01:32 +01:00
1b5f892d73 Add a currently wrong test for narrow. 2023-06-24 08:50:37 +01:00
d6cb4f1c53 Add the source offset when copying the data around. 2023-06-24 08:35:49 +01:00
dd657397b2 Skeleton implementation for the narrow method and op. 2023-06-24 08:17:35 +01:00
3deacba5f9 Reshape can now return a view. 2023-06-24 07:14:09 +01:00
47f9c48e7c Avoid duplicating the storage by refcounting it. 2023-06-24 07:03:21 +01:00
ae5dc5fbc6 Softmax tests + fix. 2023-06-23 22:46:36 +01:00
d0a91db8fd Softmax cpu implementation. 2023-06-23 22:26:53 +01:00
8443963d4f Skeleton implementation for softmax. 2023-06-23 22:00:13 +01:00
5d44e76e3f Add the casting operation. 2023-06-23 21:22:07 +01:00
8ed350dc94 Add a couple unitary ops. 2023-06-23 20:19:20 +01:00
fe75a01188 Cleanup the tensor creation code. 2023-06-23 19:52:21 +01:00
691f7d8e0f Cosmetic fix. 2023-06-23 16:43:45 +01:00
69f91b36f9 More backprop support for broadcasting ops. 2023-06-23 16:35:10 +01:00
d839d5d9fd Basic support for broadcasting backprop. 2023-06-23 16:31:44 +01:00
1936a1f0a3 Bugfix for the strided copy + add some assertions. 2023-06-23 16:28:18 +01:00
92da45879c Dummy broadcast placeholder functions. 2023-06-23 14:07:05 +01:00
7c1625f6a5 Merge pull request #6 from LaurentMazare/add_embedding
Adding embedding op (not generic gather, no select).
2023-06-23 13:49:13 +02:00
2fb87edda5 Address comments. 2023-06-23 13:43:18 +02:00
5e54f37fe1 Adding embedding op (not generic gather, no select). 2023-06-23 13:13:26 +02:00
fd21c708ab Creating Gelu op (no backward). 2023-06-23 13:07:39 +02:00
1a90f9d3a6 Cuda implementation for copying data around. 2023-06-23 11:18:29 +01:00
79e4b29c2f Add the reshape method and operation (without grad for now). 2023-06-23 10:51:05 +01:00
c4c6167949 Add the continuous method. 2023-06-23 10:45:20 +01:00
4712dcc2f6 Actually copy the data around in cat (cpu only). 2023-06-23 10:24:02 +01:00
6110db31c9 Add the cat operator (without the storage implementation for now). 2023-06-23 10:13:37 +01:00
bf9e1d1c23 Add the detach method. 2023-06-23 09:19:23 +01:00
3e7cb18d7f Handle tensor transfers between devices in the backprop. 2023-06-23 08:55:34 +01:00
3f79d81b6f Add transposition around arbitrary axis. 2023-06-23 08:51:13 +01:00
27d428af1a Add the backward pass for transpose. 2023-06-23 08:43:05 +01:00
3b550a56dc Transfer tensors between devices. 2023-06-23 08:35:22 +01:00
fc41ccb5bb Add the copy method. 2023-06-23 08:12:52 +01:00
552276749a Only keep track of the graph when needed. 2023-06-22 22:06:24 +01:00
fc83d97b41 Only support the contiguous case for cublas matmul. 2023-06-22 21:39:37 +01:00
7d9a8ff3f9 Do not ignore errors when cloning the storage. 2023-06-22 16:29:18 +01:00
2f7a072250 Rename as_slice to storage_data and implement the cuda version. 2023-06-22 16:00:22 +01:00
836ad5f76c Remove one level of indirection for the binary and unary ops. 2023-06-22 15:20:51 +01:00
625e08d6ab Abstract the implementation of Shape. 2023-06-22 12:39:15 +01:00
f052020ba2 Support cuda in to_vec3. 2023-06-22 12:22:51 +01:00
77712d4348 Addressing comments. 2023-06-22 13:13:35 +02:00
449af49b54 Adding size checking when creating a tensor from buffer + shape. 2023-06-22 13:08:57 +02:00
a8b6c848e0 Final updates. 2023-06-22 12:39:33 +02:00
04cf14f35a Moving to gemm and adding matmul backprop.
- Tentative `T` operator.
2023-06-22 12:37:02 +02:00
86e4cbbc3d Adding matmul 2023-06-22 12:25:58 +02:00
ce977b489e Adding matmul? 2023-06-22 12:25:58 +02:00