Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/original_performance_takehome
/ functions
Functions
76 in github.com/anthropics/original_performance_takehome
⨍
Functions
76
◇
Types & classes
17
↓ 9 callers
Method
alloc_scratch
(self, name=None, length=1)
perf_takehome.py:61
↓ 8 callers
Function
cycles
()
tests/submission_tests.py:67
↓ 6 callers
Function
r
(x)
problem.py:458
↓ 6 callers
Function
r
(x)
tests/frozen_problem.py:458
↓ 6 callers
Method
scratch_const
(self, val, name=None)
perf_takehome.py:70
↓ 5 callers
Method
add
(self, engine, slot)
perf_takehome.py:58
↓ 4 callers
Method
generate
(height: int)
problem.py:415
↓ 2 callers
Method
build_kernel
Like reference_kernel2 but building actual instructions. Scalar implementation using only scalar ALU and load/store.
perf_takehome.py:88
↓ 2 callers
Function
build_mem_image
Build a flat memory image of the problem.
problem.py:487
↓ 2 callers
Method
debug_info
(self)
perf_takehome.py:48
↓ 2 callers
Function
do_kernel_test
( forest_height: int, rounds: int, batch_size: int, seed: int = 123, trace: bool = False,
perf_takehome.py:178
↓ 2 callers
Function
do_kernel_test
(forest_height: int, rounds: int, batch_size: int)
tests/submission_tests.py:30
↓ 2 callers
Method
generate
(height: int)
tests/frozen_problem.py:415
↓ 2 callers
Function
reference_kernel2
Reference implementation of the kernel on a flat memory.
problem.py:535
↓ 2 callers
Method
rewrite_slot
(self, slot)
problem.py:146
↓ 2 callers
Method
rewrite_slot
(self, slot)
tests/frozen_problem.py:146
↓ 1 callers
Method
alu
(self, core, op, dest, a1, a2)
problem.py:219
↓ 1 callers
Method
alu
(self, core, op, dest, a1, a2)
tests/frozen_problem.py:219
↓ 1 callers
Method
build
(self, slots: list[tuple[Engine, tuple]], vliw: bool = False)
perf_takehome.py:51
↓ 1 callers
Method
build_hash
(self, val_hash_addr, tmp1, tmp2, round, i)
perf_takehome.py:77
↓ 1 callers
Function
build_mem_image
Build a flat memory image of the problem.
tests/frozen_problem.py:487
↓ 1 callers
Function
cdiv
(a, b)
problem.py:44
↓ 1 callers
Function
cdiv
(a, b)
tests/frozen_problem.py:44
↓ 1 callers
Function
kernel_builder
(forest_height: int, n_nodes: int, batch_size: int, rounds: int)
tests/submission_tests.py:24
↓ 1 callers
Function
myhash
A simple 32-bit hash function
problem.py:449
↓ 1 callers
Function
myhash
A simple 32-bit hash function
tests/frozen_problem.py:449
↓ 1 callers
Function
myhash_traced
A simple 32-bit hash function
problem.py:516
↓ 1 callers
Function
myhash_traced
A simple 32-bit hash function
tests/frozen_problem.py:516
↓ 1 callers
Method
print_step
(self, instr, core)
problem.py:134
↓ 1 callers
Method
print_step
(self, instr, core)
tests/frozen_problem.py:134
↓ 1 callers
Function
reference_kernel
Reference implementation of the kernel. A parallel tree traversal where at each node we set cur_inp_val = myhash(cur_inp_val ^ node_val)
problem.py:467
↓ 1 callers
Function
reference_kernel2
Reference implementation of the kernel on a flat memory.
tests/frozen_problem.py:535
↓ 1 callers
Method
rewrite_instr
Rewrite an instruction to use scratch addresses instead of names
problem.py:123
↓ 1 callers
Method
rewrite_instr
Rewrite an instruction to use scratch addresses instead of names
tests/frozen_problem.py:123
↓ 1 callers
Function
run
(server_class=http.server.HTTPServer, handler_class=MyHandler)
watch_trace.py:74
↓ 1 callers
Method
run
(self)
problem.py:197
↓ 1 callers
Method
run
(self)
tests/frozen_problem.py:197
↓ 1 callers
Method
scratch_map
(self, core)
problem.py:140
↓ 1 callers
Method
scratch_map
(self, core)
tests/frozen_problem.py:140
↓ 1 callers
Method
setup_trace
The simulator generates traces in Chrome's Trace Event Format for visualization in Perfetto (or chrome://tracing if you prefer it). S
problem.py:151
↓ 1 callers
Method
setup_trace
The simulator generates traces in Chrome's Trace Event Format for visualization in Perfetto (or chrome://tracing if you prefer it). S
tests/frozen_problem.py:151
↓ 1 callers
Method
step
Execute all the slots in each engine for a single instruction bundle
problem.py:352
↓ 1 callers
Method
step
Execute all the slots in each engine for a single instruction bundle
tests/frozen_problem.py:352
↓ 1 callers
Method
trace_post_step
(self, instr, core)
problem.py:337
↓ 1 callers
Method
trace_post_step
(self, instr, core)
tests/frozen_problem.py:337
↓ 1 callers
Method
trace_slot
(self, core, slot, name, i)
problem.py:347
↓ 1 callers
Method
trace_slot
(self, core, slot, name, i)
tests/frozen_problem.py:347
Method
__del__
(self)
problem.py:399
Method
__del__
(self)
tests/frozen_problem.py:399
Method
__init__
( self, mem_dump: list[int], program: list[Instruction], debug_info: DebugInfo
problem.py:97
Method
__init__
(self)
perf_takehome.py:41
Method
__init__
( self, mem_dump: list[int], program: list[Instruction], debug_info: DebugInfo
tests/frozen_problem.py:97
Method
do_GET
(self)
watch_trace.py:10
Method
flow
(self, core, *slot)
problem.py:300
Method
flow
(self, core, *slot)
tests/frozen_problem.py:300
Method
generate
(forest: Tree, batch_size: int, rounds: int)
problem.py:433
Method
generate
(forest: Tree, batch_size: int, rounds: int)
tests/frozen_problem.py:433
Method
load
(self, core, *slot)
problem.py:269
Method
load
(self, core, *slot)
tests/frozen_problem.py:269
Function
reference_kernel
Reference implementation of the kernel. A parallel tree traversal where at each node we set cur_inp_val = myhash(cur_inp_val ^ node_val)
tests/frozen_problem.py:467
Method
store
(self, core, *slot)
problem.py:288
Method
store
(self, core, *slot)
tests/frozen_problem.py:288
Method
test_kernel_correctness
(self)
tests/submission_tests.py:58
Method
test_kernel_cycles
(self)
perf_takehome.py:257
Method
test_kernel_speedup
(self)
tests/submission_tests.py:85
Method
test_kernel_trace
(self)
perf_takehome.py:244
Method
test_kernel_updated_starting_point
(self)
tests/submission_tests.py:88
Method
test_opus45_11hr
(self)
tests/submission_tests.py:109
Method
test_opus45_2hr
(self)
tests/submission_tests.py:101
Method
test_opus45_casual
(self)
tests/submission_tests.py:96
Method
test_opus45_improved_harness
(self)
tests/submission_tests.py:113
Method
test_opus4_many_hours
(self)
tests/submission_tests.py:92
Method
test_ref_kernels
Test the reference kernels against each other
perf_takehome.py:229
Method
test_sonnet45_many_hours
(self)
tests/submission_tests.py:105
Method
valu
(self, core, *slot)
problem.py:254
Method
valu
(self, core, *slot)
tests/frozen_problem.py:254