import hashlib


def get_sha512_hashdigest(file_path):
    """
    Returns the SHA512 hex digest for the given file.
    :param file_path: Path to the file.
    :return: SHA512 hex digest.
    """
    file_hash = hashlib.sha512()
    with open(file_path, 'rb') as f:
        while True:
            data = f.read(1024)
            if not data:
                break
            file_hash.update(data)
    return file_hash.hexdigest()