Skip to content

Commit

Permalink
Remove commented-out code
Browse files Browse the repository at this point in the history
  • Loading branch information
lockshaw committed Jan 15, 2025
1 parent 656f70e commit bb66d6e
Showing 1 changed file with 0 additions and 105 deletions.
105 changes: 0 additions & 105 deletions .flake/pkgs/ffdb/ffdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,108 +5,3 @@
gdb.execute(f'directory {get_config_root(Path.cwd())}')
gdb.prompt_hook = lambda x: '(ffdb) '
gdb.execute('set history save on')

# python
# from proj.config_file import get_config_root
# from pathlib import Path
# print(Path.cwd())
# #gdb.execute(f'directory {get_conf}/{}')
# end

# show directories

# import gdb.printing
#
# class NodePrinter:
# def __init__(self, val):
# self.val = val
#
# def to_string(self):
# ptr = self.val["ptr"]
# if ptr != 0:
# op_type = ptr.referenced_value()['op_type']
# return f'Node<guid={self.val["guid"]} ptr={ptr} op_type={op_type}>'
# else:
# return f'Node<guid={self.val["guid"]} ptr={self.val["ptr"]}>'
#
# class EdgePrinter:
# def __init__(self, val):
# self.val = val
#
# def to_string(self):
# return f'Edge<src={self.val["srcOp"]["guid"]} dst={self.val["dstOp"]["guid"]}>'
#
# class MachineViewPrinter:
# def __init__(self, val):
# self.val = val
#
# def to_string(self):
# toks = []
# if self.val['device_type'] == 0:
# toks.append('type=GPU')
# else:
# toks.append('type=CPU')
# start_device_id = self.val['start_device_id']
# for i in range(self.val['ndims']):
# dim = self.val['dim'][i]
# stride = self.val['stride'][i]
# toks.append(f'{i}=[{start_device_id}:{start_device_id+dim}:{stride}]')
# return f'MachineView<{" ".join(toks)}>'
#
# class DomainPrinter:
# def __init__(self, val):
# self.val = val
#
# def to_string(self):
# toks = []
# ndim = self.val['dim']
# for i in range(ndim):
# lo = self.val['rect_data'][i]
# hi = self.val['rect_data'][i + ndim]
# toks.append(f'{i}=[{lo}:{hi}]')
# return f'Domain<{" ".join(toks)}>'
#
# class TensorShapePrinter:
# def __init__(self, val):
# self.val = val
#
# def to_string(self):
# toks = []
# ndim = self.val['num_dims']
# for i in range(ndim):
# dim = self.val['dims'][i]
# size = dim['size']
# degree = dim['degree']
# parallel_idx = dim['parallel_idx']
# toks.append(f'{i}=[s={size} d={degree} pi={parallel_idx}]')
# return f'TensorShape<{" ".join(toks)}>'
#
# class ParallelTensorBasePrinter:
# def __init__(self, val):
# self.val = val
#
# def to_string(self):
# toks = []
# toks.append(f'guid={self.val["parallel_tensor_guid"]}')
# ndim = self.val['num_dims']
# for i in range(ndim):
# dim = self.val['dims'][i]
# size = dim['size']
# degree = dim['degree']
# parallel_idx = dim['parallel_idx']
# toks.append(f'{i}=[s={size} d={degree} pi={parallel_idx}]')
# return f'ParallelTensorBase<{" ".join(toks)}>'
#
# def build_pretty_printer():
# pp = gdb.printing.RegexpCollectionPrettyPrinter(
# "flexflow")
# pp.add_printer('Node', '^FlexFlow::PCG::Node$', NodePrinter)
# pp.add_printer('Edge', '^FlexFlow::PCG::Edge$', EdgePrinter)
# pp.add_printer('MachineView', '^FlexFlow::MachineView$', MachineViewPrinter)
# pp.add_printer('Domain', '^Legion::Domain$', DomainPrinter)
# pp.add_printer('ParallelTensorShape', '^FlexFlow::ParallelTensorShape$', TensorShapePrinter)
# pp.add_printer('ParallelTensorBase', '^FlexFlow::ParallelTensorBase$', ParallelTensorBasePrinter)
# return pp
#
# gdb.printing.register_pretty_printer(
# gdb.current_objfile(), build_pretty_printer(), replace=True)

0 comments on commit bb66d6e

Please sign in to comment.