[build] Add script for Deeploy environment variables and Makefile info#5
[build] Add script for Deeploy environment variables and Makefile info#5viv-eth wants to merge 3 commits into
Conversation
Signed-off-by: Viviane <86701002+viv-eth@users.noreply.github.com>
Signed-off-by: Viviane <86701002+viv-eth@users.noreply.github.com>
Scheremo
left a comment
There was a problem hiding this comment.
Hey Viviane, thanks for your contribution.
I personally don't like sourcing bash scripts to set up the environment. Offering as an alternative is probably okay, though. In any case, please use the tool-specific path variables rather than DEEPLOY_INSTALL_DIR
| export PULP_SDK_HOME=${DEEPLOY_INSTALL_DIR}/pulp-sdk | ||
| export LLVM_INSTALL_DIR=${DEEPLOY_INSTALL_DIR}/llvm | ||
| export PULP_RISCV_GCC_TOOLCHAIN= | ||
| export MEMPOOL_HOME=${DEEPLOY_INSTALL_DIR}/mempool |
There was a problem hiding this comment.
You shouldn't just set all these paths relative to DEEPLOY_INSTALL_DIR. The Makefile is set up such that previous installations may be reused, and each tool gets its own DIR variable.
| @echo "export PULP_SDK_HOME=${PULP_SDK_INSTALL_DIR}" | ||
| @echo "export LLVM_INSTALL_DIR=${LLVM_INSTALL_DIR}" | ||
| @echo "export PULP_RISCV_GCC_TOOLCHAIN=/PULP_SDK_IS_A_MESS" | ||
| @echo "export PULP_RISCV_GCC_TOOLCHAIN=" |
There was a problem hiding this comment.
Why not completely remove this?
There was a problem hiding this comment.
The pulp-sdk needs the environment variable set afaik but @Scheremo could confirm.
I would prefer if the contents of the variable stay untouched 😏
There was a problem hiding this comment.
Yes but it gets set when you source the platform specific setup script in the PULP SDK. I am certain that PULP_SDK_IS_A_MESS won't fix any problems 😉
There was a problem hiding this comment.
Here is a diff of my environment with/without the PULP_RISCV_GCC_TOOLCHAIN environment variable:
46d45
< PULP_RISCV_GCC_TOOLCHAIN=/PULP_SDK_IS_A_MESS
59c58
< GAP_RISCV_GCC_TOOLCHAIN=/PULP_SDK_IS_A_MESS
---
> GAP_RISCV_GCC_TOOLCHAIN=
83c82
< PATH=/home/lmacan/Deeploy/install/pulp-sdk/tools/gapy:/home/lmacan/Deeploy/install/pulp-sdk/install/workstation/bin:/PULP_SDK_IS_A_MESS/bin:/home/lmacan/Deeploy/install/pulp-sdk/tools/bin:/home/lmacan/.local/bin:/home/lmacan/micromamba/condabin:/home/lmacan/.local/bin:/home/lmacan/.cargo/bin:/home/lmacan/.local/bin:/home/lmacan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
---
> PATH=/home/lmacan/Deeploy/install/pulp-sdk/tools/gapy:/home/lmacan/Deeploy/install/pulp-sdk/install/workstation/bin:/bin:/home/lmacan/Deeploy/install/pulp-sdk/tools/bin:/home/lmacan/.local/bin:/home/lmacan/micromamba/condabin:/home/lmacan/.local/bin:/home/lmacan/.cargo/bin:/home/lmacan/.local/bin:/home/lmacan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/binThe issue is that the pulp-sdk adds stuff into your PATH variable (that seems like fun 😃), specifically this part (the diff doesn't show it quite nicely so I cut just the scary piece):
+ /PULP_SDK_IS_A_MESS/bin
- /binPulp-sdk basically adds /bin into your path in front of your other search paths which might mess up your environment. I think this was the reason to put the "/PULP_SDK_IS_A_MESS" because it's a non-existant path and doesn't screw up your environment. Bonus points for a funny name.
There was a problem hiding this comment.
This is some deep PULP lore material here 😁
There was a problem hiding this comment.
WTF, I guess I was wrong 😂 Fight fire with fire...
I thought this was just a rant, but it is actually a fix 😂
There was a problem hiding this comment.
@Xeratec you underestimated pulp and Moritz, tsk tsk tsk
|
Ciao Viviane, I'd be happy to merge this PR once the feedback from Moritz and Philip is applied and the bash script is moved to the |
|
@viv-eth What is the status of that PR? Should I implement the requested changes? |
|
Closed for inactivity. May reopen in the future. |
…ulp-platform#5) Recovers PR pulp-platform#4 (GlobalAveragePool) which was lost when GitHub merged it into the now-deleted add-averagepool-kernel branch instead of devel, plus the AveragePoolGrad fixture amendment that didn't make it into PR pulp-platform#3 before merge. GlobalAveragePool family (was in PR pulp-platform#4): - TargetLibraries/PULPOpen/src/GlobalAveragePool.c - Templates/FloatGlobalAveragePoolTemplate.py - TileConstraints/GlobalAveragePoolTileConstraint.py - Generic: GlobalAveragePool{,Grad}Layer / Parser / Checker - PULPOpen wiring + 'GlobalAveragePool', 'GlobalAveragePoolGrad' MAPPING AveragePoolGrad fixture (was lost from PR pulp-platform#3): - Tests/Kernels/FP32/AveragePoolGrad/ (N=1, C=4, H=W=8, k=s=2, NCHW) LoweringOptimizationPasses (sync with TrainingPlatform): - Add NCHWtoNHWCAveragePoolPass + NCHWtoNHWCAveragePoolGradPass classes - Register both in NCHWtoNHWCPass and PULPNCHWtoNHWCPass - Extend spatialDims handling to AveragePool / AveragePoolGrad - Variable-weight Transpose insertion in _NCHWtoNHWC_fun (training graphs) - _remove_only_singleton_reduce_mean: skip when axis is unknown Without these passes the AveragePoolGrad kernel would receive raw NCHW bytes despite expecting HWC layout. With the passes registered, fixtures stay in NCHW like forward kernels. test_siracusa_config.py: - KERNEL_TESTS += GlobalAveragePool - TRAIN_KERNEL_TESTS += AveragePoolGrad, GlobalAveragePoolGrad
This PR introduces a new script (
deeploy.sh) that sets up essential environment variables for the Deeploy project. TheMakefilehas been updated to reference this script, providing users an easy way to source environment variables directly fromdeeploy.shafter setting up the PULP SDK.Changes:
deeploy.shscript for defining paths to critical tools (LLVM, PULP SDK, QEMU, etc.)Makefileto include instructions on sourcing thedeeploy.shscript for proper environment configurationThis update simplifies the setup process by centralizing environment variables, reducing the need for manual configuration.