Use Case: Reviewing code for the transformers, where we are trying to maintain backwards compatibility with version >= 1.0.0, but our CI tests run in 1.4, so we have to manually check against breaking the backwards compatibility promise.
The git blame idea inspired me to write a script that you can add to your .bashrc/.zshrc/.bash_profile:
_checkout_grep() {  # helper fn
	git checkout $1 > /dev/null 2>&1  # surpress Previous HEAD position msg
	git grep $2 | wc -l
}

check_torch_compat () {
	# check the pytorch compatibility of a function
	# example usage check_torch_compat torch.bool, TODO: For loop
	cd ~/pytorch/docs
	echo "1.0"
	_checkout_grep v1.0.0 $1
	echo "1.1"
	_checkout_grep v1.1.0 $1
	echo "1.2"
	_checkout_grep v1.2.0 $1
	echo "1.3"
	_checkout_grep v1.3.0 $1
	echo "1.4"
	_checkout_grep v1.4.0 $1
	echo "master"
	_checkout_grep master $1
	cd -  > /dev/null 2>&1
}


Output for check_torch_compat torch.bool is below. (you have to clone the repo and put it at ~ or update the bash code with your repo path).
(0 in output means torch.bool is not in that version)

The best non-scripted solution I’ve heard is manipulating the URL in https://pytorch.org/docs/1.0.0/nn.html 1 + cmd-f. for the function name.