// Support tensors up to rank 6, i'm using int to represent a dimention just to
// make the code compile in OCaml while I experiment
type dynamic_tensor =
Tensor0 of int
| Tensor1 of int * int
| Tensor2 of int * int * int
| Tensor3 of int * int * int * int
| Tensor4 of int * int * int * int * int
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import tvm | |
from tvm import relay | |
from tvm.relay import testing, create_executor | |
SEM_VER='v0.0.1' | |
def parse_args(): | |
parser = argparse.ArgumentParser(description='Run relay program') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python foo.py & | |
[1] 21377 | |
$ gdb -p 21377 | |
GNU gdb (GDB) Fedora 7.7.1-17.fc20 | |
[... gdb loading messages ...] | |
0x00007f9a09af46e3 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:81 | |
81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) | |
(gdb) py-bt | |
#4 Frame 0x22d9c70, for file foo.py, line 12, in forever () | |
sleep(1) |
- USPS change of address
- Bank, Credit card
- Paypal
- Apple ID
- Auto insurance
- Medical insurance
- Employer information
- Mobile account information
- PG&E
- Comcast
- Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
- Take hot threads snapshots under read+write, read-only, write-only (TD - done)
- Adjust refresh time to 10s (from 1s) and see how load changes (TD)
- Measure time of a rolling restart doing
disable_flush
anddisable_recovery
(TD) - Specify routing on query -- make it choose same node for each shard each time (MD)
- GC new generation size (TD)
- Warmers
- measure before/after of client query time with and without warmers (MD)
Memory Optimization (Christer Ericson, GDC 2003)
http://realtimecollisiondetection.net/pubs/GDC03_Ericson_Memory_Optimization.ppt
Cache coherency primer (Fabian Giesen)
https://fgiesen.wordpress.com/2014/07/07/cache-coherency/
Code Clinic 2015: How to Write Code the Compiler Can Actually Optimize (Mike Acton)
http://gdcvault.com/play/1021866/Code-Clinic-2015-How-to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <thread> | |
int const NUM_THREADS = 5; | |
uint32_t counter[NUM_THREADS]; | |
void driver(int threadId) { | |
for (int i = 0; i < 100000000; ++i) { | |
counter[threadId * 16]++; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type token = Bool of bool | |
| Number of int | |
| Identifier of string | |
| SemiColon | |
| LeftBracket | |
| RightBracket | |
| LeftParen | |
| RightParen | |
| KeywordIf | |
| KeywordThen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
public: | |
vector<int> intersection(vector<int>& nums1, vector<int>& nums2) { | |
sort(nums1.begin(), nums1.end()); | |
sort(nums2.begin(), nums2.end()); | |
int i1 = 0, i2 = 0; | |
vector<int> result; | |
while (i1 < nums1.size() && i2 < nums2.size()) { | |
if (nums1[i1] == nums2[i2]) { |
NewerOlder