Skip to content

Commit ea7a9a4

Browse files
committed
[Refactor] Remove deprecated env var
1 parent 51d7028 commit ea7a9a4

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

PyTorchSimFrontend/extension_codecache.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,6 @@ def dump_metadata(args, arg_attributes, path):
2727
file.write(f'{arg_name}=({arg_attribute[0]}, {arg.dtype}, {arg.shape})\n')
2828
return
2929

30-
def llvm_compile_command(input, output):
31-
opt_output = f"{input[:-3]}_opt.ll"
32-
return [re.sub(r"[ \n]+", " ",
33-
f"""
34-
{extension_config.CONFIG_TORCHSIM_LLVM_PATH}/opt --load-pass-plugin={extension_config.CONFIG_TORCHSIM_CUSTOM_PASS_PATH}/libLowerGemminiPass.so -S -march=riscv64 --passes=LowerGemminiPass {input} -o {opt_output}
35-
""",
36-
).strip(),
37-
re.sub(r"[ \n]+", " ",
38-
f"""
39-
{extension_config.CONFIG_TORCHSIM_LLVM_PATH}/llc -march=riscv64 -mattr=+m,+f,+d,+a,+c,+v -O2 {opt_output} -o {output}
40-
""",
41-
).strip()]
42-
4330
def mlir_compile_command(filename, vectorlane_size, vlen=256):
4431
return [re.sub(r"[ \n]+", " ",
4532
f"""

PyTorchSimFrontend/extension_config.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ def __getattr__(name):
4242
# LLVM PATH
4343
if name == "CONFIG_TORCHSIM_LLVM_PATH":
4444
return os.environ.get('TORCHSIM_LLVM_PATH', default="/usr/bin")
45-
if name == "CONFIG_TORCHSIM_CUSTOM_PASS_PATH":
46-
return os.environ.get('TORCHSIM_CUSTOM_PASS_PATH',
47-
default=f"{__getattr__('CONFIG_TORCHSIM_DIR')}/GemminiLowerPass/build")
4845
if name == "CONFIG_TORCHSIM_DUMP_MLIR_IR":
4946
return int(os.environ.get("TORCHSIM_DUMP_MLIR_IR", default=False))
5047
if name == "CONFIG_TORCHSIM_DUMP_LLVM_IR":
@@ -68,10 +65,6 @@ def __getattr__(name):
6865
return os.environ.get('GEM5_SCRIPT_PATH',
6966
default=f"{__getattr__('CONFIG_TORCHSIM_DIR')}/gem5_script/script_systolic.py")
7067

71-
# For block sparse
72-
if name == "CONFIG_BLOCK_SPARSE":
73-
return int(os.environ.get('BLOCK_SPARSE', default=0))
74-
7568
# Mapping Policy
7669
if name == "CONFIG_MAPPING_POLICY":
7770
return os.environ.get('TORCHSIM_MAPPING_POLICY', default="heuristic") # heuristic, manual, autotune

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,6 @@ export TORCHSIM_VECTOR_LANE=128 # vector lane size
333333
export TORCHSIM_VECTOR_LANE_STRIDE=2 # vector lane stride for DMA
334334
export TORCHSIM_DIR=/workspace/PyTorchSim # home directory
335335

336-
export BLOCK_SPARSE=0 # If you want to use block sparse workload, turn it on
337-
338336
# Plan which tensor allocated in TPUv4's CMEM
339337
export SRAM_BUFFER_PLAN_PATH=/workspace/PyTorchSim/tpuv4/gemm_plan.py
340338

0 commit comments

Comments
 (0)