gpu performance maximization on Jetson TX1 with JetPack 3.1 fails

I am trying to run the following script on TX1

to maximize gpu performance, but it seems directory paths are different in my TX1.

(facerec-cv3.3-np1.13.1-py2.7) nvidia@tegra-ubuntu:~/softwares$ sudo ./jetson_clocks.sh
cat: /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable: No such file or directory
./jetson_clocks.sh: line 138: /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable: No such file or directory
cat: /sys/kernel/debug/clock/override.gbus/min: No such file or directory
cat: /sys/kernel/debug/clock/override.gbus/max: No such file or directory
cat: /sys/kernel/debug/clock/override.gbus/rate: No such file or directory
cat: /sys/kernel/debug/clock/override.gbus/state: No such file or directory
./jetson_clocks.sh: line 189: /sys/kernel/debug/clock/override.gbus/rate: No such file or directory
./jetson_clocks.sh: line 190: /sys/kernel/debug/clock/override.gbus/state: No such file or directory
Error: Failed to max GPU frequency!
cat: /sys/kernel/debug/clock/override.emc/min: No such file or directory
cat: /sys/kernel/debug/clock/override.emc/max: No such file or directory
cat: /sys/kernel/debug/clock/override.emc/rate: No such file or directory
cat: /sys/kernel/debug/clock/override.emc/state: No such file or directory
./jetson_clocks.sh: line 215: /sys/kernel/debug/clock/override.emc/rate: No such file or directory
./jetson_clocks.sh: line 216: /sys/kernel/debug/clock/override.emc/state: No such file or directory
(facerec-cv3.3-np1.13.1-py2.7) nvidia@tegra-ubuntu:~/softwares$

How to solve this problem?

I have found the following new paths to override gpu clocks. However, having tried all sorts of ways to update the clock, I had no lock

nvidia@tegra-ubuntu:~$ sudo -i bash -c ‘echo 998400000 > /sys/kernel/debug/clk/gbus/clk_rate’
bash: line 0: echo: write error: Permission denied

I found the solution:
I will put the whole script in the near future in https://github.com/smajida
do_gpu()
{
case “{SOCFAMILY}" in tegra186) GPU_MIN_FREQ="/sys/devices/17000000.gp10b/devfreq/17000000.gp10b/min_freq" GPU_MAX_FREQ="/sys/devices/17000000.gp10b/devfreq/17000000.gp10b/max_freq" GPU_CUR_FREQ="/sys/devices/17000000.gp10b/devfreq/17000000.gp10b/cur_freq" GPU_RAIL_GATE="/sys/devices/17000000.gp10b/railgate_enable" ;; tegra210) GPU_MIN_FREQ="/sys/devices/57000000.gpu/devfreq/57000000.gpu/min_freq" GPU_MAX_FREQ="/sys/devices/57000000.gpu/devfreq/57000000.gpu/max_freq" GPU_CUR_FREQ="/sys/devices/57000000.gpu/devfreq/57000000.gpu/cur_freq" GPU_RAIL_GATE="/sys/devices/57000000.gpu/railgate_enable" ;; *) echo "Error! unsupported SOC {SOCFAMILY}”
exit 1;
;;
esac

case "${ACTION}" in
	show)
		echo "GPU MinFreq=`cat ${GPU_MIN_FREQ}`" \
			"MaxFreq=`cat ${GPU_MAX_FREQ}`" \
			"CurrentFreq=`cat ${GPU_CUR_FREQ}`"
		;;
	store)
		store "${GPU_MIN_FREQ}"
		store "${GPU_RAIL_GATE}"
		;;
	*)
		echo 0 > "${GPU_RAIL_GATE}"
		cat "${GPU_MAX_FREQ}" > "${GPU_MIN_FREQ}"
		ret=$?
		if [ ${ret} -ne 0 ]; then
			echo "Error: Failed to max GPU frequency!"
		fi
		;;
esac

}